Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3a4837f

Browse files
committed
Avoid edge case in pg_visibility test with small shared_buffers
Since 82a4eda 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
1 parent 41d3780 commit 3a4837f

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

contrib/pg_visibility/expected/pg_visibility.out

+1-2
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,7 @@ select * from pg_visibility_map('copyfreeze');
217217
-------+-------------+------------
218218
0 | t | t
219219
1 | t | t
220-
2 | t | t
221-
(3 rows)
220+
(2 rows)
222221

223222
select * from pg_check_frozen('copyfreeze');
224223
t_ctid

contrib/pg_visibility/sql/pg_visibility.sql

-6
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,6 @@ copy copyfreeze from stdin freeze;
108108
4 '4'
109109
5 '5'
110110
6 '6'
111-
7 '7'
112-
8 '8'
113-
9 '9'
114-
10 '10'
115-
11 '11'
116-
12 '12'
117111
\.
118112
commit;
119113
select * from pg_visibility_map('copyfreeze');

0 commit comments

Comments
 (0)