mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 15:16:29 +00:00
repmgrd: remove superfluous query buffer
Query can be sent as-is, no need to copy it to a buffer.
This commit is contained in:
@@ -322,8 +322,6 @@ is_standby(PGconn *conn)
|
||||
bool
|
||||
is_pgup(PGconn *conn, int timeout)
|
||||
{
|
||||
char sqlquery[QUERY_STR_LEN];
|
||||
|
||||
/* Check the connection status twice in case it changes after reset */
|
||||
bool twice = false;
|
||||
|
||||
@@ -346,8 +344,7 @@ is_pgup(PGconn *conn, int timeout)
|
||||
if (wait_connection_availability(conn, timeout) != 1)
|
||||
goto failed;
|
||||
|
||||
sqlquery_snprintf(sqlquery, "SELECT 1");
|
||||
if (PQsendQuery(conn, sqlquery) == 0)
|
||||
if (PQsendQuery(conn, "SELECT 1") == 0)
|
||||
{
|
||||
log_warning(_("PQsendQuery: Query could not be sent to primary. %s\n"),
|
||||
PQerrorMessage(conn));
|
||||
|
||||
Reference in New Issue
Block a user