From: Tom Lane <tgl@sss.pgh.pa.us>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: legrand legrand <legrand_legrand@hotmail.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: pg_stat_statements: duplicated external query texts with MSY2
Date: Thu, 11 Jun 2020 07:16:48 -0400
Message-ID: <198017.1591874208@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOBaU_bzpLSMK2APN7Tkcw+G=6Pqjco-95vqvtCaS-8s97Dndg@mail.gmail.com>
References: <PR3PR01MB6426697AE2792766C67B8B3A90850@PR3PR01MB6426.eurprd01.prod.exchangelabs.com>
<CAOBaU_bzpLSMK2APN7Tkcw+G=6Pqjco-95vqvtCaS-8s97Dndg@mail.gmail.com>
Julien Rouhaud <rjuju123@gmail.com> writes:
> On Mon, Jun 8, 2020 at 11:28 PM legrand legrand
> <legrand_legrand@hotmail.com> wrote:
>> pgbench -i postgres
>> pgbench -c20 -t5 postgres
>> generates the attached pgss_query_texts.stat,
>> where "BEGIN" and "UPDATE pgbench_accounts SET abalance = abalance + $1 WHERE aid = $2"
>> appears 20 times ...
> Is the duplication only in the query text file? Looking at the code
> the query text part is stored holding a shared lwlock, so it seems
> like an expected behavior (less overhead but might store duplicated
> query text)
I agree, this looks like operating-as-designed: different processes can
store the same query text and only later discover that they were creating
duplicate hash table entries. It's a bit surprising that the duplication
would be reproducible, but it just depends on timing. Maybe this is
telling us something about how scheduling works under MSYS2.
regards, tom lane
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: tgl@sss.pgh.pa.us, rjuju123@gmail.com, legrand_legrand@hotmail.com
Subject: Re: pg_stat_statements: duplicated external query texts with MSY2
In-Reply-To: <198017.1591874208@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