• Alvaro Herrera's avatar
    walreceiver: tweak pg_stat_wal_receiver behavior · 1bdae16f
    Alvaro Herrera authored
    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 9ed551e0 reported by Fujii Masao and Michël Paquier.
    
    Author: Michaël Paquier
    1bdae16f
walreceiver.c 40.5 KB