pg_stat_wal_receiver and flushedUpto/writtenUpto

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Cc: Thomas Munro <thomas.munro@gmail.com>
Date: 2020-05-15T09:08:17Z
Lists: pgsql-hackers

Attachments

Hi,

As discussed in the thread that introduced d140f2f3 to rename
receivedUpto to flushedUpto and add writtenUpto to the WAL receiver's
shared memory information, the equivalent columns in
pg_stat_wal_receiver have not been renamed:
https://www.postgresql.org/message-id/CA+hUKGJ06d3h5JeOtAv4h52n0vG1jOPZxqMCn5FySJQUVZA32w@mail.gmail.com

When I have implemented this system view, the idea was to keep a
one-one mapping between the SQL interface and the shmem info even if
we are not compatible with past versions, hence I think that before
beta1 we had better fix that and:
- rename received_lsn to flushed_lsn.
- add one column for writtenUpto.

Attached is a patch to do that.  This needs also a catalog version
bump, and I am adding an open item.
Thanks,
--
Michael

Commits

  1. Doc: Replace reference to pg_stat_wal_receiver.received_lsn by flushed_lsn

  2. Make pg_stat_wal_receiver consistent with the WAL receiver's shmem info