|From:||"Anton A(dot) Melnikov" <aamelnikov(at)inbox(dot)ru>|
|To:||Robert Haas <robertmhaas(at)gmail(dot)com>|
|Cc:||Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>|
|Subject:||Re: Possible fails in pg_stat_statements test|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
On 30.03.2022 22:36, Robert Haas wrote:
> I don't think that the idea of "extra" WAL records is very principled.
> It's pretty vague what "extra" means, and your definition seems to be
> basically "whatever would be needed to make this test case pass." I
> think the problem is basically with the test cases's idea that # of
> WAL records and # of table rows ought to be equal. I think that's just
> false. In general, we'd also have to worry about index insertions,
> which would provoke variable numbers of WAL records depending on
> whether they cause a page split. And we'd have to worry about TOAST
> table insertions, which could produce different numbers of records
> depending on the size of the data, the configured block size and TOAST
> threshold, and whether the TOAST table index incurs a page split.
Thank you very much for this information. I really didn't take it into
> If it's true that this test case sometimes randomly fails, then we
> ought to fix that somehow, maybe by just removing this particular
> check from the test case, or changing it to >=, or something like
> that. But I don't think adding a new counter is the right idea.
Indeed. Then there is a very simple solution for this particular case as
wal_records counter may only sometime becomes greater but never less.
The corresponding patch is attached.
With best regards,
Anton A. Melnikov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
|Next Message||Robert Haas||2022-03-31 15:12:07||Re: pgsql: Add 'basebackup_to_shell' contrib module.|
|Previous Message||Matthias van de Meent||2022-03-31 14:58:15||Re: Restructure ALTER TABLE notes to clarify table rewrites and verification scans|