postgresql/src/backend/storage
Fujii Masao 17d3fcdc39 Fix bug that causes to report waiting in PS display twice, in hot standby.
Previously "waiting" could appear twice via PS in case of lock conflict
in hot standby mode. Specifically this issue happend when the delay
in WAL application determined by max_standby_archive_delay and
max_standby_streaming_delay had passed but it took more than 500 msec
to cancel all the conflicting transactions. Especially we can observe this
easily by setting those delay parameters to -1.

The cause of this issue was that WaitOnLock() and
ResolveRecoveryConflictWithVirtualXIDs() added "waiting" to
the process title in that case. This commit prevents
ResolveRecoveryConflictWithVirtualXIDs() from reporting waiting
in case of lock conflict, to fix the bug.

Back-patch to all back branches.

Author: Masahiko Sawada
Reviewed-by: Fujii Masao
Discussion: https://postgr.es/m/CA+fd4k4mXWTwfQLS3RPwGr4xnfAEs1ysFfgYHvmmoUgv6Zxvmg@mail.gmail.com
2020-03-10 00:14:43 +09:00
..
buffer Fix typos. 2020-02-10 09:31:18 +05:30
file Move src/backend/utils/hash/hashfn.c to src/common 2020-02-27 09:25:41 +05:30
freespace Update copyrights for 2020 2020-01-01 12:21:45 -05:00
ipc Fix bug that causes to report waiting in PS display twice, in hot standby. 2020-03-10 00:14:43 +09:00
large_object Update copyrights for 2020 2020-01-01 12:21:45 -05:00
lmgr Fix typo in proc.c 2020-02-07 12:41:10 +09:00
page Add deduplication to nbtree. 2020-02-26 13:05:30 -08:00
smgr Refactor confusing code in _mdfd_openseg(). 2020-01-27 09:12:56 +13:00
sync Fix typos. 2020-02-10 09:31:18 +05:30
Makefile Refactor the fsync queue for wider use. 2019-04-04 23:38:38 +13:00