Re: Extensible storage manager API - SMGR hook Redux
Kirill Reshke <reshkekirill@gmail.com>
From: Kirill Reshke <reshkekirill@gmail.com>
To: Andreas Karlsson <andreas@proxel.se>
Cc: Nitin Jadhav <nitinjadhavpostgres@gmail.com>,
Tristan Partin <tristan@neon.tech>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Matthias van de Meent <boekewurm+postgres@gmail.com>,
Heikki Linnakangas <hlinnaka@iki.fi>, Andres Freund <andres@anarazel.de>
Date: 2025-03-10T12:30:23Z
Lists: pgsql-hackers
On Fri, 7 Mar 2025 at 16:52, Andreas Karlsson <andreas@proxel.se> wrote: > > Hi, Hi! > Here is a rebased version of it to make the CI happy. Looks like CI is still unhappy with this change[0] 0001: >+ >+SMgrId >+smgr_register(const f_smgr *smgr, Size smgrrelation_size) ... > + Assert(smgr->smgr_open != NULL); > + Assert(smgr->smgr_close != NULL); > + Assert(smgr->smgr_create != NULL); > + Assert(smgr->smgr_exists != NULL); > + Assert(smgr->smgr_unlink != NULL); > + Assert(smgr->smgr_extend != NULL); > + Assert(smgr->smgr_zeroextend != NULL); > + Assert(smgr->smgr_prefetch != NULL); > + Assert(smgr->smgr_readv != NULL); > + Assert(smgr->smgr_writev != NULL); > + Assert(smgr->smgr_writeback != NULL); > + Assert(smgr->smgr_nblocks != NULL); > + Assert(smgr->smgr_truncate != NULL); > + Assert(smgr->smgr_immedsync != NULL); 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. 0002: should we merge this with 0001? 0003: Looks mature, no comments. 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? 0005: We are missing rationale for this change in the commit message. I didn't look at the 0006 modifications. Later, I'll try to take another look. [0] https://cirrus-ci.com/task/6466113875214336 -- Best regards, Kirill Reshke