From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: pg_stat_activity: show NULL stmt start time for walsenders
Date: Tue, 7 Jan 2020 18:16:24 -0300
Message-ID: <20200107211624.GA18974@alvherre.pgsql> (raw)
In-Reply-To: <E1iovoL-0003KI-GH@gemulon.postgresql.org>
On 2020-Jan-07, Alvaro Herrera wrote:
> 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.
So I misidentified things; it's not commit be87b70b6117 (pg11) that put
auxiliary processes in pg_stat_activity, but fc70a4b0df38 (pg10). So I
applied it back to pg10 also. (I did verify that walsenders appear with
a xact_time in pg_stat_activity in pg10 before this patch, and not
afterwards.)
We're still computing useless xact start timestamps in branches 9.4 -
9.6, but I don't think we care. (If we do care, then we probably also
care about xact *stop* time ... but meh.)
Thanks
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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@2ndquadrant.com
Subject: Re: pgsql: pg_stat_activity: show NULL stmt start time for walsenders
In-Reply-To: <20200107211624.GA18974@alvherre.pgsql>
References: <E1iovoL-0003KI-GH@gemulon.postgresql.org> <20200107211624.GA18974@alvherre.pgsql>
* 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