Re: Control your disk usage in PG: Introduction to Disk Quota Extension
Xing Guo <higuoxing@gmail.com>
From: Xing Guo <higuoxing@gmail.com>
To: Stephen Frost <sfrost@snowman.net>
Cc: Daniel Gustafsson <daniel@yesql.se>, Haozhou Wang <hawang@pivotal.io>, David Steele <david@pgmasters.net>, Michael Paquier <michael@paquier.xyz>, Alvaro Herrera <alvherre@2ndquadrant.com>, Hubert Zhang <hzhang@pivotal.io>, Thomas Munro <thomas.munro@gmail.com>, Andres Freund <andres@anarazel.de>, Robert Haas <robertmhaas@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Tomas Vondra <tomas.vondra@2ndquadrant.com>, Heikki Linnakangas <hlinnakangas@pivotal.io>
Date: 2024-02-27T01:41:45Z
Lists: pgsql-hackers
On Tue, Feb 27, 2024 at 6:38 AM Stephen Frost <sfrost@snowman.net> wrote: > > Greetings, > > * Xing Guo (higuoxing@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