]> git.ipfire.org Git - thirdparty/postgresql.git/commit
pg_stat_activity: show NULL stmt start time for walsenders
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 7 Jan 2020 20:38:48 +0000 (17:38 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 7 Jan 2020 20:55:21 +0000 (17:55 -0300)
commit8de3b68faffcb5898244bd8af3abfb6edb11543f
tree073b3d426793d87a5520722775f8f83c17a0780b
parent66fd0adc73a8d3b0c43423c7d263cba37edaa36b
pg_stat_activity: show NULL stmt start time for walsenders

Returning a non-NULL time is pointless, sinc a walsender is not a
process that would be running normal transactions anyway, but the code
was unintentionally exposing the process start time intermittently,
which was not only bogus but it also confused monitoring systems looking
for idle transactions.  Fix by avoiding all updates in walsenders.

Backpatch to pg10: previously I misidentified the branches that show
auxiliary processes in pg_stat_activity.

Reported-by: Tomas Vondra
Discussion: https://postgr.es/m/20191209234409.exe7osmyalwkt5j4@development
src/backend/access/transam/xact.c