From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Andres Freund <andres@anarazel.de>
Cc: Fujii Masao <masao.fujii@gmail.com>
Cc: maxim.boguk@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #10123: Weird entries in pg_stat_activity
Date: Thu, 17 Oct 2024 01:59:10 +0900
Message-ID: <d7a858f9-404f-4535-8160-3222e43cf8c5@oss.nttdata.com> (raw)
In-Reply-To: <20240704220316.srzqzkb7zgzh76xy@alap3.anarazel.de>
References: <20140424101827.2714.39486@wrigleys.postgresql.org>
<CAHGQGwEQWk6J+vqQnnVFFngtMdMuw-AwuEFnq=u3Wb2STXu3TA@mail.gmail.com>
<2153c106-8979-430d-ba86-34d35e565ab4@oss.nttdata.com>
<20240704220316.srzqzkb7zgzh76xy@alap3.anarazel.de>
On 2024/07/05 7:03, Andres Freund wrote:
> Calls to pgstat_report_activity() aren't exactly free. This substantially
> increases the number of calls to it for common workloads. There got to be a
> more targeted way of dealing with this.
Yes. So, as an alternative approach, how about setting xact_start and
query_start to NULL whenever the state is idle, since non-NULL values
aren't expected in that case? This would prevent the weired pg_stat_activity
entries I mentioned earlier, with minimal performance impact.
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: masao.fujii@oss.nttdata.com, andres@anarazel.de, masao.fujii@gmail.com, maxim.boguk@gmail.com
Subject: Re: [BUGS] BUG #10123: Weird entries in pg_stat_activity
In-Reply-To: <d7a858f9-404f-4535-8160-3222e43cf8c5@oss.nttdata.com>
* 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