From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: myon@debian.org
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: 15beta1 test failure on mips in isolation/expected/stats
Date: Fri, 20 May 2022 01:25:10 -0400
Message-ID: <275476.1653024310@sss.pgh.pa.us> (raw)
In-Reply-To: <20220520044106.dxvm55g3o2yhvdzj@alap3.anarazel.de>
References: <YoZf7U/WmfmFYFEx@msg.df7cb.de>
<250690.1653010951@sss.pgh.pa.us>
<20220520.110221.606276306063702515.horikyota.ntt@gmail.com>
<20220520.111427.2049044078750812296.horikyota.ntt@gmail.com>
<258994.1653015494@sss.pgh.pa.us>
<20220520035928.c5k267fgsxhtpbnt@alap3.anarazel.de>
<268353.1653020534@sss.pgh.pa.us>
<20220520044106.dxvm55g3o2yhvdzj@alap3.anarazel.de>
Andres Freund <andres@anarazel.de> writes:
> On 2022-05-20 00:22:14 -0400, Tom Lane wrote:
>> There's some fallout in the expected-file, of course, but this
>> does seem to fix it (20 consecutive successful runs now at
>> 100/2). Don't see why though ...
> I think what might be happening is that the transactional stats updates get
> reported by s2 *before* the non-transactional stats updates come in from
> s1. I.e. the pgstat_report_stat() at the end of s2_commit_prepared_a does a
> report, because the machine is slow enough for it to be "time to reports stats
> again". Then s1 reports its non-transactional stats.
Sounds plausible. And I left the test loop running, and it's now past
100 consecutive successes, so I think this change definitely "fixes" it.
> It looks like our stats maintenance around truncation isn't quite "concurrency
> safe". That code hasn't meaningfully changed, but it'd not be surprising if
> it's not 100% precise...
Yeah. Probably not something to try to improve post-beta, especially
since it's not completely clear how transactional and non-transactional
cases *should* interact. Maybe non-transactional updates should be
pushed immediately? But I'm not sure if that's fully correct, and
it definitely sounds expensive.
I'd be good with tweaking this test case as you suggest, and maybe
revisiting the topic later.
Kyotaro-san worried about whether any other places in stats.spec
have the same issue. I've not seen any evidence of that in my
tests, but perhaps some other machine with different timing
could find it.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, horikyota.ntt@gmail.com, myon@debian.org
Subject: Re: 15beta1 test failure on mips in isolation/expected/stats
In-Reply-To: <275476.1653024310@sss.pgh.pa.us>
References: <YoZf7U/WmfmFYFEx@msg.df7cb.de> <250690.1653010951@sss.pgh.pa.us> <20220520.110221.606276306063702515.horikyota.ntt@gmail.com> <20220520.111427.2049044078750812296.horikyota.ntt@gmail.com> <258994.1653015494@sss.pgh.pa.us> <20220520035928.c5k267fgsxhtpbnt@alap3.anarazel.de> <268353.1653020534@sss.pgh.pa.us> <20220520044106.dxvm55g3o2yhvdzj@alap3.anarazel.de> <275476.1653024310@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