walreceiver: tweak pg_stat_wal_receiver behavior
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

jmcatamney/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,lisakowen/gpdb,lisakowen/gpdb,lisakowen/gpdb,adam8157/gpdb,xinzweb/gpdb,xinzweb/gpdb,50wu/gpdb,lisakowen/gpdb,jmcatamney/gpdb,50wu/gpdb,adam8157/gpdb,50wu/gpdb,xinzweb/gpdb,ashwinstar/gpdb,lisakowen/gpdb,greenplum-db/gpdb,adam8157/gpdb,ashwinstar/gpdb,xinzweb/gpdb,lisakowen/gpdb,50wu/gpdb,50wu/gpdb,ashwinstar/gpdb,50wu/gpdb,ashwinstar/gpdb,adam8157/gpdb,50wu/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,xinzweb/gpdb,adam8157/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,xinzweb/gpdb,ashwinstar/gpdb,xinzweb/gpdb,lisakowen/gpdb,adam8157/gpdb,xinzweb/gpdb,adam8157/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,adam8157/gpdb,50wu/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,lisakowen/gpdb