Re: Sync scan & regression tests - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Sync scan & regression tests
Date
Msg-id CA+hUKGJeerdJ8EzqB8r3CdPx4NaU1v5ZE7D+UBmr_n+Z5PDD_Q@mail.gmail.com
Whole thread Raw
In response to Sync scan & regression tests  (Konstantin Knizhnik <knizhnik@garret.ru>)
Responses Re: Sync scan & regression tests
List pgsql-hackers
On Mon, Aug 7, 2023 at 7:21 AM Konstantin Knizhnik <knizhnik@garret.ru> wrote:
> Two tests are failed because of sync scan - this tests cluster.sql and
> portals.sql perform seqscan without explicit order by and expect that
> data will be returned in particular order. But because of sync scan it
> doesn't happen. Small shared buffers are needed to satisfy seqscan
> criteria in heapam.c: `scan->rs_nblocks > NBuffers / 4` for tenk1 table.

I wondered the same thing while working on the tests in commit
8ab0ebb9a84, which explicitly care about physical order, so they *say
so* with ORDER BY ctid.  But the problem seems quite widespread, so I
didn't volunteer to try to do something like that everywhere, when Tom
committed cbf4177f for 027_stream_regress.pl.

FWIW here's another discussion of that cluster test, in which I was
still figuring out some surprising ways this feature can introduce
non-determinism even without concurrent access to the same table.

https://www.postgresql.org/message-id/flat/CA%2BhUKGLTK6ZuEkpeJ05-MEmvmgZveCh%2B_w013m7%2ByKWFSmRcDA%40mail.gmail.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Sync scan & regression tests
Next
From: Peter Geoghegan
Date:
Subject: Re: Use of additional index columns in rows filtering