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-01-22 21:10:30
Message-ID: CAN4CZFNe1GSAuqWi62UOrpt+M7-Auwiz5V9iF6VavNT=GuPqyQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello!

I rebased the patch and addressed all comments.

> Are we sure we need to force extension authors to implement prefetch?
> Also, do we intentionally skip Assert on smgr_registersync and
> smgr_init here? I am not questioning smgr_shutdown here, as I can see
> it is NULL for md implementation.

Added the new asserts, also for the new startreadv.

I don't see a problem with requiring implementing prefetch, the
implementing function can be empty.

> 0002:
> should we merge this with 0001?

Done!

> 0004:
> It's a bit strange to place fsync_checker under contrib, huh? Like,
> you will never use it in production. Maybe src/test/modules is a
> better place?

I moved it to the test folder. In a later version I'll also modify it
to something more suited for actual testing - for now it's just a
simple example use.

> 0005:
> We are missing rationale for this change in the commit message.

I added a more detailed commit message, which hopefully explains why
this change could be useful.

Attachment Content-Type Size
v5-0002-Add-checkpoint_create_hook.patch application/octet-stream 1.9 KB
v5-0001-Expose-f_smgr-to-extensions-for-manual-implementa.patch application/octet-stream 35.6 KB
v5-0004-Refactor-smgr-API-mdcreate-needs-the-old-relfilel.patch application/octet-stream 62.3 KB
v5-0003-Add-src-test-modules-fsync_checker.patch application/octet-stream 10.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Khoa Nguyen 2026-01-22 21:15:32 Re: [PATCH] Align verify_heapam.c error message offset with test expectations
Previous Message Masahiko Sawada 2026-01-22 20:33:28 Re: pg_upgrade: optimize replication slot caught-up check