postgresql/src
Fujii Masao c9a47b81ed 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:23:22 +09:00
..
backend Fix bug that causes to report waiting in PS display twice, in hot standby. 2020-03-10 00:23:22 +09:00
bin createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate 2020-02-27 11:21:28 +09:00
common Fix portability failure introduced in commits d2b0b60e7 et al. 2018-12-26 15:30:35 -05:00
include Stamp 9.5.21. 2020-02-10 17:23:16 -05:00
interfaces Stamp 9.5.21. 2020-02-10 17:23:16 -05:00
makefiles Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:36 -04:00
pl Fix confusion about event trigger vs. plain function in plpgsql. 2020-02-19 14:44:58 -05:00
port Stamp 9.5.21. 2020-02-10 17:23:16 -05:00
template Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:36 -04:00
test Fix confusion about event trigger vs. plain function in plpgsql. 2020-02-19 14:44:58 -05:00
timezone Update time zone data files to tzdata release 2019c. 2019-09-20 19:54:29 -04:00
tools Handle spaces in OpenSSL install location for MSVC 2019-10-04 15:38:48 -04:00
tutorial Remove no-longer-required function declarations. 2015-05-24 12:20:23 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Install TAP test infrastructure so it's available for extension testing. 2016-09-23 15:50:00 -04:00
Makefile.global.in Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:36 -04:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00