mirror of
https://github.com/neondatabase/neon.git
synced 2025-12-23 06:09:59 +00:00
Reintialize page in allocNewBuffer only when buffer is returned (#12399)
## Problem See https://github.com/neondatabase/neon/issues/12387 `allocNewBuffer` initialise page with zeros but not always return it because of parity checks. In case of wrong parity the page is rejected and as a result we have dirty page with zero LSN, which cause assertion failure on neon_write when page is evicted from shared buffers. ## Summary of changes Perform, page initialisation in `allocNewBuffer` only when buffer is returned (parity check is passed). Postgres PRs: https://github.com/neondatabase/postgres/pull/661 https://github.com/neondatabase/postgres/pull/662 https://github.com/neondatabase/postgres/pull/663 https://github.com/neondatabase/postgres/pull/664 --------- Co-authored-by: Konstantin Knizhnik <knizhnik@neon.tech> Co-authored-by: Kosntantin Knizhnik <konstantin.knizhnik@databricks.com>
This commit is contained in:
committed by
GitHub
parent
b3844903e5
commit
b00a0096bf
9
test_runner/sql_regress/expected/neon-spgist.out
Normal file
9
test_runner/sql_regress/expected/neon-spgist.out
Normal file
@@ -0,0 +1,9 @@
|
||||
-- Test unlogged build of SPGIST index (no "Page evicted with zero LSN" error)
|
||||
create table spgist_point_tbl(id int4, p point);
|
||||
create index spgist_point_idx on spgist_point_tbl using spgist(p) with (fillfactor = 25);
|
||||
insert into spgist_point_tbl (id, p) select g, point(g*10, g*10) from generate_series(1, 10000) g;
|
||||
insert into spgist_point_tbl (id, p) select g, point(g*10, g*10) from generate_series(1, 10000) g;
|
||||
insert into spgist_point_tbl (id, p) select g+100000, point(g*10+1, g*10+1) from generate_series(1, 10000) g;
|
||||
vacuum spgist_point_tbl;
|
||||
insert into spgist_point_tbl (id, p) select g+100000, point(g*10+1, g*10+1) from generate_series(1, 10000) g;
|
||||
checkpoint;
|
||||
@@ -9,5 +9,6 @@ test: neon-rel-truncate
|
||||
test: neon-clog
|
||||
test: neon-test-utils
|
||||
test: neon-vacuum-full
|
||||
test: neon-event-triggers
|
||||
test: neon-subxacts
|
||||
test: neon-spgist
|
||||
test: neon-event-triggers
|
||||
|
||||
10
test_runner/sql_regress/sql/neon-spgist.sql
Normal file
10
test_runner/sql_regress/sql/neon-spgist.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
-- Test unlogged build of SPGIST index (no "Page evicted with zero LSN" error)
|
||||
create table spgist_point_tbl(id int4, p point);
|
||||
create index spgist_point_idx on spgist_point_tbl using spgist(p) with (fillfactor = 25);
|
||||
insert into spgist_point_tbl (id, p) select g, point(g*10, g*10) from generate_series(1, 10000) g;
|
||||
insert into spgist_point_tbl (id, p) select g, point(g*10, g*10) from generate_series(1, 10000) g;
|
||||
insert into spgist_point_tbl (id, p) select g+100000, point(g*10+1, g*10+1) from generate_series(1, 10000) g;
|
||||
|
||||
vacuum spgist_point_tbl;
|
||||
insert into spgist_point_tbl (id, p) select g+100000, point(g*10+1, g*10+1) from generate_series(1, 10000) g;
|
||||
checkpoint;
|
||||
2
vendor/postgres-v14
vendored
2
vendor/postgres-v14
vendored
Submodule vendor/postgres-v14 updated: 4cacada8bd...c9f9fdd011
2
vendor/postgres-v15
vendored
2
vendor/postgres-v15
vendored
Submodule vendor/postgres-v15 updated: e5ee23d998...aaaeff2550
2
vendor/postgres-v16
vendored
2
vendor/postgres-v16
vendored
Submodule vendor/postgres-v16 updated: ad2b69b582...9b9cb4b3e3
2
vendor/postgres-v17
vendored
2
vendor/postgres-v17
vendored
Submodule vendor/postgres-v17 updated: ba750903a9...fa1788475e
8
vendor/revisions.json
vendored
8
vendor/revisions.json
vendored
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"v17": [
|
||||
"17.5",
|
||||
"ba750903a90dded8098f2f56d0b2a9012e6166af"
|
||||
"fa1788475e3146cc9c7c6a1b74f48fd296898fcd"
|
||||
],
|
||||
"v16": [
|
||||
"16.9",
|
||||
"ad2b69b58230290fc44c08fbe0c97981c64f6c7d"
|
||||
"9b9cb4b3e33347aea8f61e606bb6569979516de5"
|
||||
],
|
||||
"v15": [
|
||||
"15.13",
|
||||
"e5ee23d99874ea9f5b62f8acc7d076162ae95d6c"
|
||||
"aaaeff2550d5deba58847f112af9b98fa3a58b00"
|
||||
],
|
||||
"v14": [
|
||||
"14.18",
|
||||
"4cacada8bde7f6424751a0727a657783c6a1d20b"
|
||||
"c9f9fdd0113b52c0bd535afdb09d3a543aeee25f"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user