RE: pg_stat_statements: duplicated external query texts with MSY2

Поиск
Список
Период
Сортировка
От legrand legrand
Тема RE: pg_stat_statements: duplicated external query texts with MSY2
Дата
Msg-id PR3PR01MB64260DB3BC252C86CB23D89990800@PR3PR01MB6426.eurprd01.prod.exchangelabs.com
обсуждение исходный текст
Ответ на Re: pg_stat_statements: duplicated external query texts with MSY2  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs

>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

Hello,

duplication is only in the query text file, selecting plans or calls in the view
pg_stat_statements are corrects.

For information, this is reproducable with official build
"PostgreSQL 12.1, compiled by Visual C++ build 1914, 64-bit"
on windows 10.

Regards
PAscal

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Potential G2-item cycles under serializable isolation
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Potential G2-item cycles under serializable isolation