Add conninfo to pg_stat_wal_receiver

Enterprise / PostgreSQL - Alvaro Herrera [alvh.no-ip.org] - 29 June 2016 15:57 UTC

Commit b1a9bad9e744 introduced a stats view to provide insight into the running WAL receiver, but neglected to include the connection string in it, as reported by Michaël Paquier. This commit fixes that omission. (Any security-sensitive information is not disclosed).

While at it, close the mild security hole that we were exposing the password in the connection string in shared memory. This isn't user-accessible, but it still looks like a good idea to avoid having the cleartext password in memory.

Author: Michaël Paquier, Álvaro Herrera Review by: Vik Fearing

Discussion: https://www.postgresql.org/message-id/CAB7nPqStg4M561obo7ryZ5G+fUydG4v1Ajs1xZT1ujtu+woRag@mail.gmail.com

9ed551e Add conninfo to pg_stat_wal_receiver
doc/src/sgml/monitoring.sgml | 8 ++
src/backend/catalog/system_views.sql | 3 +-
.../libpqwalreceiver/libpqwalreceiver.c | 52 ++++++++++++
src/backend/replication/walreceiver.c | 85 ++++++++++++--------
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 2 +-
src/include/replication/walreceiver.h | 9 ++-
7 files changed, 122 insertions(+), 39 deletions(-)

Upstream: git.postgresql.org


  • Share