Re: Sync scan & regression tests
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Konstantin Knizhnik <knizhnik@garret.ru>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2023-08-06T23:29:58Z
Lists: 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
Commits
-
Avoid edge case in pg_visibility test with small shared_buffers
- 408209d6a9ae 16.3 landed
- 3a4837fc809a 17.0 landed
-
Report syncscan position at end of scan.
- d5feb6011e62 16.0 landed
- e8d74ad625f7 17.0 landed
-
hio: Take number of prior relation extensions into account
- 82a4edabd272 17.0 cited
-
Reduce code duplication between heapgettup and heapgettup_pagemode
- 7ae0ab0ad970 16.0 cited
-
Fix CLUSTER tuplesorts on abbreviated expressions.
- 8ab0ebb9a842 15.0 cited
-
Set PD_ALL_VISIBLE and visibility map bits in COPY FREEZE
- 7db0cd2145f2 14.0 cited