Commit 1bdae16
committed
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 9ed551e reported by Fujii Masao and Michël Paquier.
Author: Michaël Paquier1 parent 9e70398 commit 1bdae16
1 file changed
+6
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
| |||
770 | 771 | | |
771 | 772 | | |
772 | 773 | | |
| 774 | + | |
773 | 775 | | |
774 | 776 | | |
775 | 777 | | |
| |||
1343 | 1345 | | |
1344 | 1346 | | |
1345 | 1347 | | |
1346 | | - | |
1347 | | - | |
1348 | | - | |
1349 | | - | |
1350 | 1348 | | |
1351 | | - | |
1352 | | - | |
| 1349 | + | |
| 1350 | + | |
1353 | 1351 | | |
1354 | | - | |
1355 | | - | |
1356 | | - | |
1357 | | - | |
1358 | | - | |
1359 | | - | |
1360 | | - | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
| 1352 | + | |
| 1353 | + | |
1364 | 1354 | | |
1365 | 1355 | | |
1366 | 1356 | | |
| |||
0 commit comments