From 145e7e4b960620216ea0478af38d22c3c21220d6 Mon Sep 17 00:00:00 2001 From: MMeent Date: Fri, 2 Dec 2022 13:35:01 +0100 Subject: [PATCH] Prefetch cleanup: (#2876) - **Enable `enable_seqscan_prefetch` by default** - Drop use of `seqscan_prefetch_buffers` in favor of `[maintenance,effective]_io_concurrency` This includes adding some fields to the HeapScan execution node, and vacuum state. - Cleanup some conditionals in vacuumlazy.c - Clarify enable_seqscan_prefetch GUC description - Fix issues in heap SeqScan prefetching where synchronize_seqscan machinery wasn't handled properly. --- .github/workflows/benchmarking.yml | 3 ++- pgxn/neon/libpagestore.c | 12 ++++++------ vendor/postgres-v14 | 2 +- vendor/postgres-v15 | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/benchmarking.yml b/.github/workflows/benchmarking.yml index a5cf4b4694..860e5d72b6 100644 --- a/.github/workflows/benchmarking.yml +++ b/.github/workflows/benchmarking.yml @@ -232,7 +232,8 @@ jobs: if: matrix.platform == 'neon-captest-prefetch' run: | psql ${BENCHMARK_CONNSTR} -c "ALTER DATABASE neondb SET enable_seqscan_prefetch=on" - psql ${BENCHMARK_CONNSTR} -c "ALTER DATABASE neondb SET seqscan_prefetch_buffers=10" + psql ${BENCHMARK_CONNSTR} -c "ALTER DATABASE neondb SET effective_io_concurrency=32" + psql ${BENCHMARK_CONNSTR} -c "ALTER DATABASE neondb SET maintenance_io_concurrency=32" env: BENCHMARK_CONNSTR: ${{ steps.set-up-connstr.outputs.connstr }} diff --git a/pgxn/neon/libpagestore.c b/pgxn/neon/libpagestore.c index ae8275168d..1aba2e1ede 100644 --- a/pgxn/neon/libpagestore.c +++ b/pgxn/neon/libpagestore.c @@ -464,12 +464,12 @@ pg_init_libpagestore(void) NULL, NULL, NULL); DefineCustomIntVariable("neon.readahead_buffer_size", "number of prefetches to buffer", - "This buffer is used to store prefetched data; so " - "it is important that this buffer is at least as " - "large as the configured value of all tablespaces' " - "effective_io_concurrency and maintenance_io_concurrency, " - "your sessions' values of these, and the value for " - "seqscan_prefetch_buffers.", + "This buffer is used to hold and manage prefetched " + "data; so it is important that this buffer is at " + "least as large as the configured value of all " + "tablespaces' effective_io_concurrency and " + "maintenance_io_concurrency, and your sessions' " + "values for these settings.", &readahead_buffer_size, 128, 16, 1024, PGC_USERSET, diff --git a/vendor/postgres-v14 b/vendor/postgres-v14 index da50d99db5..06edb5af61 160000 --- a/vendor/postgres-v14 +++ b/vendor/postgres-v14 @@ -1 +1 @@ -Subproject commit da50d99db54848f7a3e910f920aaad7dc6915d36 +Subproject commit 06edb5af6180f99ee1bd6903bae2898d2ea128ef diff --git a/vendor/postgres-v15 b/vendor/postgres-v15 index 780c3f8e35..edf4c161dd 160000 --- a/vendor/postgres-v15 +++ b/vendor/postgres-v15 @@ -1 +1 @@ -Subproject commit 780c3f8e3524c2e32a2e28884c7b647fcebf71d7 +Subproject commit edf4c161dd0182d22c28297e841ca253bc1b8ee4