pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Sergei Kornilov <sk@zsrv.org>
Cc: imai.yoshikazu@fujitsu.com <imai.yoshikazu@fujitsu.com>
Cc: legrand legrand <legrand_legrand@hotmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Planning counters in pg_stat_statements (using pgss_store)
Date: Sun, 25 Jul 2021 12:59:35 -0400
Message-ID: <81235.1627232375@sss.pgh.pa.us> (raw )
In-Reply-To: <20210725163637.qkslpe24mgzen73t@nol >
References: <CAOBaU_YMDofrfRrA4c_kNfFd4ZtwtoTy1XmnBom7rwyVGeFTDw@mail.gmail.com >
<8c6449d4-5fd7-f544-182b-a4bb7da1d18c@oss.nttdata.com >
<20200331060307.e7kypfynz7jous62@nol >
<ac44fd08-5923-c0f7-742d-952a6f5a14a3@oss.nttdata.com >
<20200331073321.bhnx2p63gp5px37f@nol >
<f2b4e098-1b96-e1a8-f601-a0908c9ff8c4@oss.nttdata.com >
<20200331184217.tf3x534uz4vusgmp@nol >
<bd27f039-5285-1fb7-5ed4-57f870c8a5a4@oss.nttdata.com >
<13923268-bad9-80f9-2542-5fd5e8b8c500@oss.nttdata.com >
<42557.1627229005@sss.pgh.pa.us >
<20210725163637.qkslpe24mgzen73t@nol >
Julien Rouhaud <rjuju123@gmail.com> writes:
> On Sun, Jul 25, 2021 at 12:03:25PM -0400, Tom Lane wrote:
>> So AFAICS this test is inherently unstable and there is no code bug
>> to be fixed. We could drop the "plans" column from this query, or
>> print something approximate like "plans > 0 AND plans <= calls".
>> Thoughts?
> I think we should go with the latter. Checking for a legit value, even if it's
> a bit imprecise is still better than nothing.
> Would it be worth to split the query for the prepared statement row vs the rest
> to keep the full "plans" coverage when possible?
+1, the same thought occurred to me later. Also, if we're making
it specific to the one PREPARE example, we could get away with
checking "plans >= 2 AND plans <= calls", with a comment like
"we expect at least one replan event, but there could be more".
Do you want to prepare a patch?
regards, tom lane
view thread (127+ messages) latest in thread
Message-ID: <81235.1627232375@sss.pgh.pa.us>
Permalink: ../81235.1627232375@sss.pgh.pa.us/
Also on: postgresql.org/message-id/81235.1627232375@sss.pgh.pa.us
copy link · copy postgr.es
reply 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-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, rjuju123@gmail.com, masao.fujii@oss.nttdata.com, sk@zsrv.org, imai.yoshikazu@fujitsu.com, legrand_legrand@hotmail.com
Subject: Re: Planning counters in pg_stat_statements (using pgss_store)
In-Reply-To: <81235.1627232375@sss.pgh.pa.us>
* 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