From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_stat_activity: show NULL stmt start time for walsenders
Date: Tue, 07 Jan 2020 20:50:45 +0000
Message-ID: <E1iovoL-0003KM-Hx@gemulon.postgresql.org> (raw)
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 11, where walsenders started appearing in pg_stat_activity.
Reported-by: Tomas Vondra
Discussion: https://postgr.es/m/20191209234409.exe7osmyalwkt5j4@development
Branch
------
REL_11_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/896db774e5b0a851792f02c8a19ea9b07c9dcc23
Modified Files
--------------
src/backend/access/transam/xact.c | 7 +++++++
1 file changed, 7 insertions(+)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: alvherre@alvh.no-ip.org
Subject: Re: pgsql: pg_stat_activity: show NULL stmt start time for walsenders
In-Reply-To: <E1iovoL-0003KM-Hx@gemulon.postgresql.org>
References: <E1iovoL-0003KM-Hx@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox