From d865881d59621e2425dd9028f2768c1e847163bf Mon Sep 17 00:00:00 2001 From: Matthias van de Meent Date: Mon, 23 Sep 2024 23:16:42 +0200 Subject: [PATCH] NOAI (#9084) We can't FlushOneBuffer when we're in redo-only mode on PageServer, so make execution of that function conditional on us not running in pageserver walredo mode. --- .github/workflows/build_and_test.yml | 1 - test_runner/regress/test_unlogged.py | 16 +++++++++++++++- vendor/postgres-v14 | 2 +- vendor/postgres-v15 | 2 +- vendor/postgres-v16 | 2 +- vendor/postgres-v17 | 2 +- vendor/revisions.json | 8 ++++---- 7 files changed, 23 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 6617ca42bb..f36dbfb1f0 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -1207,7 +1207,6 @@ jobs: # Usually we do `needs: [...]` needs: - build-and-test-locally - - check-submodules - check-codestyle-python - check-codestyle-rust - promote-images diff --git a/test_runner/regress/test_unlogged.py b/test_runner/regress/test_unlogged.py index deba29536c..4431ccd959 100644 --- a/test_runner/regress/test_unlogged.py +++ b/test_runner/regress/test_unlogged.py @@ -15,8 +15,13 @@ def test_unlogged(neon_simple_env: NeonEnv): cur = conn.cursor() cur.execute("CREATE UNLOGGED TABLE iut (id int);") - # create index to test unlogged index relation as well + # create index to test unlogged index relations as well cur.execute("CREATE UNIQUE INDEX iut_idx ON iut (id);") + cur.execute("CREATE INDEX ON iut USING gist (int4range(id, id, '[]'));") + cur.execute("CREATE INDEX ON iut USING spgist (int4range(id, id, '[]'));") + cur.execute("CREATE INDEX ON iut USING gin ((id::text::jsonb));") + cur.execute("CREATE INDEX ON iut USING brin (id);") + cur.execute("CREATE INDEX ON iut USING hash (id);") cur.execute("ALTER TABLE iut ADD COLUMN seq int GENERATED ALWAYS AS IDENTITY;") cur.execute("INSERT INTO iut (id) values (42);") @@ -39,3 +44,12 @@ def test_unlogged(neon_simple_env: NeonEnv): assert results == [(43, 2)] else: assert results == [(43, 1)] + + # Flush all data and compact it, so we detect any errors related to + # unlogged indexes materialization. + ps_http = env.pageserver.http_client() + ps_http.timeline_compact( + tenant_id=env.initial_tenant, + timeline_id=env.initial_timeline, + force_image_layer_creation=True, + ) diff --git a/vendor/postgres-v14 b/vendor/postgres-v14 index a38d15f323..2199b83fb7 160000 --- a/vendor/postgres-v14 +++ b/vendor/postgres-v14 @@ -1 +1 @@ -Subproject commit a38d15f3233a4c07f2bf3335fcbd874dd1f4e386 +Subproject commit 2199b83fb72680001ce0f43bf6187a21dfb8f45d diff --git a/vendor/postgres-v15 b/vendor/postgres-v15 index 16c3c6b64f..22e580fe9f 160000 --- a/vendor/postgres-v15 +++ b/vendor/postgres-v15 @@ -1 +1 @@ -Subproject commit 16c3c6b64f1420a367a2a9b2510f20d94f791af8 +Subproject commit 22e580fe9ffcea7e02592110b1c9bf426d83cada diff --git a/vendor/postgres-v16 b/vendor/postgres-v16 index 1d7081a3b0..e131a9c027 160000 --- a/vendor/postgres-v16 +++ b/vendor/postgres-v16 @@ -1 +1 @@ -Subproject commit 1d7081a3b076ddf5086e0b118d4329820e6a7427 +Subproject commit e131a9c027b202ce92bd7b9cf2569d48a6f9948e diff --git a/vendor/postgres-v17 b/vendor/postgres-v17 index 2cf120e739..7b3e52c75c 160000 --- a/vendor/postgres-v17 +++ b/vendor/postgres-v17 @@ -1 +1 @@ -Subproject commit 2cf120e7393ca5f537c6a38b457585576dc035fc +Subproject commit 7b3e52c75ca384de9c69477c158b1f5dcdcbb4be diff --git a/vendor/revisions.json b/vendor/revisions.json index 9f6512d03e..bc7070744a 100644 --- a/vendor/revisions.json +++ b/vendor/revisions.json @@ -1,18 +1,18 @@ { "v17": [ "17rc1", - "2cf120e7393ca5f537c6a38b457585576dc035fc" + "7b3e52c75ca384de9c69477c158b1f5dcdcbb4be" ], "v16": [ "16.4", - "1d7081a3b076ddf5086e0b118d4329820e6a7427" + "e131a9c027b202ce92bd7b9cf2569d48a6f9948e" ], "v15": [ "15.8", - "16c3c6b64f1420a367a2a9b2510f20d94f791af8" + "22e580fe9ffcea7e02592110b1c9bf426d83cada" ], "v14": [ "14.13", - "a38d15f3233a4c07f2bf3335fcbd874dd1f4e386" + "2199b83fb72680001ce0f43bf6187a21dfb8f45d" ] }