pgsql: Use streaming read I/O in autoprewarm

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use streaming read I/O in autoprewarm
Date: 2025-04-04 19:29:26
Message-ID: E1u0mjG-002gL8-33@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use streaming read I/O in autoprewarm

Make a read stream for each valid fork of each valid relation
represented in the autoprewarm dump file and prewarm those blocks
through the read stream API instead of by directly invoking
ReadBuffer().

Co-authored-by: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Co-authored-by: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Reviewed-by: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Reviewed-by: Daniel Gustafsson <daniel(at)yesql(dot)se>
Reviewed-by: Andrey M. Borodin <x4mmm(at)yandex-team(dot)ru> (earlier versions)
Reviewed-by: Kirill Reshke <reshkekirill(at)gmail(dot)com> (earlier versions)
Reviewed-by: Matheus Alcantara <mths(dot)dev(at)pm(dot)me> (earlier versions)
Discussion: https://postgr.es/m/flat/CAN55FZ3n8Gd%2BhajbL%3D5UkGzu_aHGRqnn%2BxktXq2fuds%3D1AOR6Q%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d9c7911e1a5f354b7c34b7f53a52e0a690e7ebc9

Modified Files
--------------
contrib/pg_prewarm/autoprewarm.c | 126 ++++++++++++++++++++++++++++++++-------
src/tools/pgindent/typedefs.list | 1 +
2 files changed, 104 insertions(+), 23 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2025-04-04 19:51:56 pgsql: pg_dump: Reduce memory usage of dumps with statistics.
Previous Message Peter Geoghegan 2025-04-04 18:14:46 pgsql: Avoid extra index searches through preprocessing.