replace LOCAL_HOST_NAME with LocalHostName

pull/7449/head
Onur Tirtir 2024-01-24 14:12:40 +03:00
parent 1d096df7f4
commit f214b81d11
4 changed files with 3 additions and 11 deletions

View File

@ -445,7 +445,7 @@ GetEffectiveConnKey(ConnectionHashKey *key)
if (!IsTransactionState())
{
/* we're in the task tracker, so should only see loopback */
Assert(strncmp(LOCAL_HOST_NAME, key->hostname, MAX_NODE_LENGTH) == 0 &&
Assert(strncmp(LocalHostName, key->hostname, MAX_NODE_LENGTH) == 0 &&
PostPortNumber == key->port);
return key;
}

View File

@ -125,7 +125,7 @@ wait_until_metadata_sync(PG_FUNCTION_ARGS)
/* First we start listening. */
MultiConnection *connection = GetNodeConnection(FORCE_NEW_CONNECTION,
LOCAL_HOST_NAME, PostPortNumber);
LocalHostName, PostPortNumber);
ExecuteCriticalRemoteCommand(connection, "LISTEN " METADATA_SYNC_CHANNEL);
/*

View File

@ -155,7 +155,7 @@ run_commands_on_session_level_connection_to_node(PG_FUNCTION_ARGS)
StringInfo processStringInfo = makeStringInfo();
StringInfo workerProcessStringInfo = makeStringInfo();
MultiConnection *localConnection = GetNodeConnection(0, LOCAL_HOST_NAME,
MultiConnection *localConnection = GetNodeConnection(0, LocalHostName,
PostPortNumber);
if (!singleConnection)

View File

@ -61,14 +61,6 @@
*/
#define LOCAL_NODE_ID UINT32_MAX
/*
* If you want to connect to the current node use `LocalHostName`, which is a GUC, instead
* of the hardcoded loopback hostname. Only if you really need the loopback hostname use
* this define.
*/
#define LOCAL_HOST_NAME "localhost"
/* forward declare, to avoid forcing large headers on everyone */
struct pg_conn; /* target of the PGconn typedef */
struct MemoryContextData;