On Tue, Feb 27, 2024 at 6:38 AM Stephen Frost <sfr...@snowman.net> wrote: > > Greetings, > > * Xing Guo (higuox...@gmail.com) wrote: > > Looks that many hackers are happy with the original patch except that > > the original patch needs a simple rebase, though it has been 3 years. > > I'm not completely against the idea of adding these hooks, but I have to > say that it's unfortunate to imagine having to use an extension for > something like quotas as it's really something that would ideally be in > core. > > > Shall we push forward this patch so that it can benefit extensions not > > only diskquota? > > Would be great to hear about other use-cases for these hooks, which > would also help us be comfortable that these are the right hooks to > introduce with the correct arguments. What are the other extensions > that you're referring to here..?
Sorry, we don't have another concrete extension that utilizes the smgrcreate / smgrtruncate / smgrdounlinkall hooks right now. But we have a transparent data encryption extension that utilizes the smgrread and smgrwrite hooks to mutate the read buffer and write buffer in place to perform file level encryption and decryption. I think smgrwrite / smgrread / smgrcreate / smgrtruncate and smgrdounlinkall hooks fall into the same catagory and these hooks are different from the recent proposed storage manager API hooks[1]. Probably it is worth starting a new thread and discussing them. [1]: https://www.postgresql.org/message-id/flat/CAEze2WgMySu2suO_TLvFyGY3URa4mAx22WeoEicnK%3DPCNWEMrA%40mail.gmail.com > Thanks, > > Stephen Best Regards, Xing