From f7badd73bb970839cf2817e8f6dadf26e8adf4b6 Mon Sep 17 00:00:00 2001 From: osdba Date: Wed, 15 Nov 2023 18:39:07 +0800 Subject: [PATCH] Increase pg_prewarm loading speed --- contrib/pg_prewarm/pg_prewarm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/pg_prewarm/pg_prewarm.c b/contrib/pg_prewarm/pg_prewarm.c index 1f4bfb8c0d4..3a1979f35a4 100644 --- a/contrib/pg_prewarm/pg_prewarm.c +++ b/contrib/pg_prewarm/pg_prewarm.c @@ -192,7 +192,10 @@ pg_prewarm(PG_FUNCTION_ARGS) Buffer buf; CHECK_FOR_INTERRUPTS(); - buf = ReadBufferExtended(rel, forkNumber, block, RBM_NORMAL, NULL); + //buf = ReadBufferExtended(rel, forkNumber, block, RBM_NORMAL, NULL); + buf = polar_bulk_read_buffer_extended(rel, MAIN_FORKNUM, block, + RBM_NORMAL, NULL, + 64); ReleaseBuffer(buf); ++blocks_done; }