pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Avoid edge case in pg_visibility test with small shared_buffers
2+ messages / 1 participants
[nested] [flat]

* pgsql: Avoid edge case in pg_visibility test with small shared_buffers
@ 2024-03-26 03:28  Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 2+ messages in thread

From: Andres Freund @ 2024-03-26 03:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid edge case in pg_visibility test with small shared_buffers

Since 82a4edabd27 we can bulk extend relations. The bulk relation extension
logic has a heuristic component. Normally the heurstic does not trigger in the
occasionally-failing test case, as the relation is only extended once. But
with very small shared_buffers the limits for the number of buffers pinned at
once prevent the extension from happening at once. With the second "bulk"
extension, the heuristic kicks in, and the relation ends up one block bigger.
That's ok from a correctness perspective, but changes the results of the test
query due to one additional block.

We discussed a few more expansive fixes, but for now have decided to avoid
this by making the table a bit smaller.

Author: Heikki Linnakangas <hlinnaka@iki.fi>
Reported-by:
Discussion: https://postgr.es/m/29c74104-210b-ef39-2522-27a6aa7a704f@iki.fi
Discussion: https://postgr.es/m/20230916000011.2ugpkkkp7bpp4cfh@awork3.anarazel.de
Backpatch: 16-, where the new relation extension logic was added

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3a4837fc809a8656374959049f3ac7a09a711334

Modified Files
--------------
contrib/pg_visibility/expected/pg_visibility.out | 3 +--
contrib/pg_visibility/sql/pg_visibility.sql      | 6 ------
2 files changed, 1 insertion(+), 8 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Avoid edge case in pg_visibility test with small shared_buffers
@ 2024-03-26 03:28  Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 2+ messages in thread

From: Andres Freund @ 2024-03-26 03:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid edge case in pg_visibility test with small shared_buffers

Since 82a4edabd27 we can bulk extend relations. The bulk relation extension
logic has a heuristic component. Normally the heurstic does not trigger in the
occasionally-failing test case, as the relation is only extended once. But
with very small shared_buffers the limits for the number of buffers pinned at
once prevent the extension from happening at once. With the second "bulk"
extension, the heuristic kicks in, and the relation ends up one block bigger.
That's ok from a correctness perspective, but changes the results of the test
query due to one additional block.

We discussed a few more expansive fixes, but for now have decided to avoid
this by making the table a bit smaller.

Author: Heikki Linnakangas <hlinnaka@iki.fi>
Reported-by:
Discussion: https://postgr.es/m/29c74104-210b-ef39-2522-27a6aa7a704f@iki.fi
Discussion: https://postgr.es/m/20230916000011.2ugpkkkp7bpp4cfh@awork3.anarazel.de
Backpatch: 16-, where the new relation extension logic was added

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/408209d6a9ae90a822edd48ce3c173b8b7e04ab7

Modified Files
--------------
contrib/pg_visibility/expected/pg_visibility.out | 3 +--
contrib/pg_visibility/sql/pg_visibility.sql      | 6 ------
2 files changed, 1 insertion(+), 8 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-03-26 03:28 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-03-26 03:28 pgsql: Avoid edge case in pg_visibility test with small shared_buffers Andres Freund <andres@anarazel.de>
2024-03-26 03:28 pgsql: Avoid edge case in pg_visibility test with small shared_buffers Andres Freund <andres@anarazel.de>

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