mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-04 09:37:20 +02:00
Consistently set all fields in pg_stat_replication to null instead of 0
Previously the "sent" field would be set to 0 and all other xlog pointers be set to NULL if there were no valid values (such as when in a backup sending walsender).
This commit is contained in:
parent
a9c56ff0e1
commit
28c366789e
@ -2826,6 +2826,9 @@ pg_stat_get_wal_senders(PG_FUNCTION_ARGS)
|
||||
else
|
||||
{
|
||||
values[1] = CStringGetTextDatum(WalSndGetStateString(state));
|
||||
|
||||
if (XLogRecPtrIsInvalid(sentPtr))
|
||||
nulls[2] = true;
|
||||
values[2] = LSNGetDatum(sentPtr);
|
||||
|
||||
if (XLogRecPtrIsInvalid(write))
|
||||
|
Loading…
Reference in New Issue
Block a user