| From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org |
| Subject: | pgsql: walreceiver: tweak pg_stat_wal_receiver behavior |
| Date: | 2016-07-01 17:55:20 |
| Message-ID: | E1bJ2eu-0005LD-RW@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
walreceiver: tweak pg_stat_wal_receiver behavior
There are two problems in the original coding: one is that if one
walreceiver process exits, the ready_to_display flag remains set in
shared memory, exposing the conninfo of the next walreceiver before
obfuscating. Fix by having WalRcvDie reset the flag.
Second, the sleep-and-retry behavior that waited until walreceiver had
set ready_to_display wasn't liked; the preference is to have it return
no data instead, so let's do that.
Bugs in 9ed551e0a reported by Fujii Masao and Michël Paquier.
Author: Michaël Paquier
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/1bdae16fca884a9190dc330790e7a63c04989fa3
Modified Files
--------------
src/backend/replication/walreceiver.c | 22 ++++++----------------
1 file changed, 6 insertions(+), 16 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2016-07-01 19:09:10 | pgsql: Provide and use a makefile target to build all generated headers |
| Previous Message | Tom Lane | 2016-07-01 17:12:44 | pgsql: Rethink the GetForeignUpperPaths API (again). |