mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +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
|
bool
|
||||||
is_pgup(PGconn *conn, int timeout)
|
is_pgup(PGconn *conn, int timeout)
|
||||||
{
|
{
|
||||||
char sqlquery[QUERY_STR_LEN];
|
|
||||||
|
|
||||||
/* Check the connection status twice in case it changes after reset */
|
/* Check the connection status twice in case it changes after reset */
|
||||||
bool twice = false;
|
bool twice = false;
|
||||||
|
|
||||||
@@ -346,8 +344,7 @@ is_pgup(PGconn *conn, int timeout)
|
|||||||
if (wait_connection_availability(conn, timeout) != 1)
|
if (wait_connection_availability(conn, timeout) != 1)
|
||||||
goto failed;
|
goto failed;
|
||||||
|
|
||||||
sqlquery_snprintf(sqlquery, "SELECT 1");
|
if (PQsendQuery(conn, "SELECT 1") == 0)
|
||||||
if (PQsendQuery(conn, sqlquery) == 0)
|
|
||||||
{
|
{
|
||||||
log_warning(_("PQsendQuery: Query could not be sent to primary. %s\n"),
|
log_warning(_("PQsendQuery: Query could not be sent to primary. %s\n"),
|
||||||
PQerrorMessage(conn));
|
PQerrorMessage(conn));
|
||||||
|
|||||||
Reference in New Issue
Block a user