pg.ddx.io pgsql-hackers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Jeff Davis <pgsql@j-davis.com>
Cc: Bossart, Nathan <bossartn@amazon.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.
Date: Mon, 8 Nov 2021 12:23:18 -0500
Message-ID: <20211108172318.GF20998@tamriel.snowman.net> (raw)
In-Reply-To: <20211107184649.mpncdezkzfq2v4pb@alap3.anarazel.de>
References: <2f6c033019c3a1ec499b516e3e54022b7bcdb58a.camel@j-davis.com>
<202110310026.zmhkxct6ka6c@alvherre.pgsql>
<6498F6FC-714B-4AC2-B0E1-9A5321654277@amazon.com>
<20211101165025.GS20998@tamriel.snowman.net>
<5e7a618de1b49ba1ceede54ee1b1d073bd57f1f4.camel@j-davis.com>
<20211104224204.ee5673h3qlzblh7e@alap3.anarazel.de>
<ae70a6ff7700a821849be0da6cd0da69e0e4b05e.camel@j-davis.com>
<CA+Tgmob9TxDV3X4+=eG9E+o80MW_qoJjTvvHhRt252OO=X9FbA@mail.gmail.com>
<20211107184649.mpncdezkzfq2v4pb@alap3.anarazel.de>
Greetings,
* Andres Freund (andres@anarazel.de) wrote:
> On 2021-11-05 08:42:58 -0400, Robert Haas wrote:
> > On Thu, Nov 4, 2021 at 7:38 PM Jeff Davis <pgsql@j-davis.com> wrote:
> > > It seems like this specific approach has been mostly shot down already.
> > > But out of curiosity, are you intending to run CHECKPOINT during
> > > bootstrap or something?
> >
> > Imagine a system with corruption in pg_proc. Right now, that won't
> > prevent you from successfully executing a checkpoint. With this
> > approach, it might.
>
> Exactly. It wouldn't matter if checkpoints weren't something needed to
> potentially bring the system back into a sane state, but ...
This really isn't that hard to address- do a superuser check, if it
passes then just call the checkpoint function like CHECKPOINT; does
today. Otherwise, check the perms on the function or just call the
function in a manner which would check privileges, or maybe have another
predefined role, though I continue to feel like the function based
approach is better.
If we're actually worried about catalog corruption (and, frankly, I've
got some serious doubts that jumping in and running CHECKPOINT; by hand
is a great idea if there's such active corruption) then we must use such
an approach no matter how we allow non-superusers to run the command
because any approach to that necessarily involves some amount of catalog
access.
Any concern leveraged against pg_proc applies equally to pg_auth_members
after all, so having it be something role-based vs. function privilege
is really just moving deck chairs around on the titanic at that point.
Thanks,
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
view thread (65+ messages) latest in thread
Message-ID: <20211108172318.GF20998@tamriel.snowman.net> Permalink: ../20211108172318.GF20998@tamriel.snowman.net/ Also on: postgresql.org/message-id/20211108172318.GF20998@tamriel.snowman.net ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-hackers@postgresql.org Cc: sfrost@snowman.net, andres@anarazel.de, robertmhaas@gmail.com, pgsql@j-davis.com, bossartn@amazon.com, alvherre@alvh.no-ip.org, bharath.rupireddyforpostgres@gmail.com Subject: Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT. In-Reply-To: <20211108172318.GF20998@tamriel.snowman.net> References: <2f6c033019c3a1ec499b516e3e54022b7bcdb58a.camel@j-davis.com> <202110310026.zmhkxct6ka6c@alvherre.pgsql> <6498F6FC-714B-4AC2-B0E1-9A5321654277@amazon.com> <20211101165025.GS20998@tamriel.snowman.net> <5e7a618de1b49ba1ceede54ee1b1d073bd57f1f4.camel@j-davis.com> <20211104224204.ee5673h3qlzblh7e@alap3.anarazel.de> <ae70a6ff7700a821849be0da6cd0da69e0e4b05e.camel@j-davis.com> <CA+Tgmob9TxDV3X4+=eG9E+o80MW_qoJjTvvHhRt252OO=X9FbA@mail.gmail.com> <20211107184649.mpncdezkzfq2v4pb@alap3.anarazel.de> <20211108172318.GF20998@tamriel.snowman.net> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox