Re: Extensible storage manager API - SMGR hook Redux

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Andreas Karlsson <andreas(at)proxel(dot)se>, Nitin Jadhav <nitinjadhavpostgres(at)gmail(dot)com>, Tristan Partin <tristan(at)neon(dot)tech>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: Extensible storage manager API - SMGR hook Redux
Date: 2026-02-04 12:22:00
Message-ID: CAN4CZFMRgQAy+6sDfgx0oFc+JEzL2TqCiM0Ns-Z0zmrbBwss=w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello!

I made a mistake during my previous rebase, I fixed that in the new v6 version.

I also added one more patch, which makes AIO callbacks (for the
startreadv functions) extensible. Without that the "read" part of the
SMGR extensibility isn't that useful, as most read calls already use
the new AIO infrastructure.

To showcase another open source use case for this extension other than
pg_tde, I also created a new simple extension, pg_smgrstat, which
provides file level IO statistics using this API:

https://github.com/dutow/pg_smgrstat/

I'm also experimenting with another extension on top of these
statistics, which implements automatic offloading to slower storage
and back, based on the usage patterns of the file. I'll share that
along with later patch updates when it's ready.

Attachment Content-Type Size
v6-0004-Refactor-smgr-API-mdcreate-needs-the-old-relfilel.patch application/x-patch 17.3 KB
v6-0003-Add-src-test-modules-fsync_checker.patch application/x-patch 10.0 KB
v6-0001-Expose-f_smgr-to-extensions-for-manual-implementa.patch application/x-patch 35.6 KB
v6-0005-SMGR-GUC-variable-and-chaining.patch application/x-patch 52.6 KB
v6-0002-Add-checkpoint_create_hook.patch application/x-patch 1.9 KB
v6-0006-Make-AIO-handle-callbacks-extensible.patch application/x-patch 5.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Viktor Holmberg 2026-02-04 12:52:10 Re: ON CONFLICT DO SELECT (take 3)
Previous Message Ashutosh Bapat 2026-02-04 11:44:10 Re: Support logical replication of DDLs