Skip to content

Commit

Permalink
Change lsn retrieval method to directly call a UDF (#84)
Browse files Browse the repository at this point in the history
We used to get received_lsn value from a view. We now directly call pg_last_wal_receive_lsn() function to get received lsn value.
  • Loading branch information
mtuncer committed Oct 8, 2019
1 parent 1d85287 commit 21fb063
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bin/pg_autoctl/pgsql.c
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,7 @@ bool
pgsql_get_received_lsn_from_standby(PGSQL *pgsql, char *receivedLSN, int maxLSNSize)
{
SingleValueResultContext context;
char *sql = "SELECT received_lsn FROM pg_stat_wal_receiver";
char *sql = "SELECT pg_last_wal_receive_lsn()";

context.resultType = PGSQL_RESULT_STRING;
context.parsedOk = false;
Expand Down

0 comments on commit 21fb063

Please sign in to comment.