Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mhyUF-0001bf-G0 for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Nov 2021 18:26:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mhyUE-0005Ny-DD for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Nov 2021 18:26:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mhyUE-0005No-4J for pgsql-hackers@lists.postgresql.org; Tue, 02 Nov 2021 18:26:18 +0000 Received: from tamriel.snowman.net ([70.109.60.50]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mhyUB-0000gB-NC for pgsql-hackers@postgresql.org; Tue, 02 Nov 2021 18:26:17 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id E6C695F799; Tue, 2 Nov 2021 14:26:14 -0400 (EDT) Date: Tue, 2 Nov 2021 14:26:14 -0400 From: Stephen Frost To: Jeff Davis , "Bossart, Nathan" Cc: Robert Haas , "pgsql-hackers@postgresql.org" , Alvaro Herrera , Bharath Rupireddy Subject: Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT. Message-ID: <20211102182614.GC20998@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AezGfTGj77mqFsOM" Content-Disposition: inline In-Reply-To: <2E63F740-B422-40A8-B8B0-28CDD5FEF41F@amazon.com> <2e40c2274d1b6b3479d5b52315687b3c1b52bafa.camel@j-davis.com> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --AezGfTGj77mqFsOM Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Jeff Davis (pgsql@j-davis.com) wrote: > On Tue, 2021-11-02 at 11:06 -0400, Robert Haas wrote: > > Just as a sort of general comment on this endeavor, I suspect that > > any > > attempt to lump things together that seem closely related is doomed > > to > > backfire. >=20 > Agreed, I think that is apparent from the different opinions in this > thread. >=20 > Robert had a good idea over here though: Think you meant 'Stephen' there. ;) > https://postgr.es/m/20211101165025.GS20998@tamriel.snowman.net >=20 > which gives fine-grained control without the "clutter" of extra > predefined roles. Right. * Bossart, Nathan (bossartn@amazon.com) wrote: > On 11/2/21, 10:29 AM, "Jeff Davis" wrote: > > Great idea! Patch attached. > > > > This feels like a good pattern that we might want to use elsewhere, if > > the need arises. >=20 > The approach in the patch looks alright to me, but another one could > be to build a SelectStmt when parsing CHECKPOINT. I think that'd > simplify the standard_ProcessUtility() changes. For my 2c, at least, I'm not really partial to either approach, though I'd want to see what error messages end up looking like. Seems like we might want to exercise a bit more control than we'd be able to if we transformed it directly into a SelectStmt (that is, we might add a HINT: roles with execute rights on pg_checkpoint() can run this command, or something; maybe not too tho). > Otherwise, I see a couple of warnings when compiling: > xlogfuncs.c:54: warning: implicit declaration of function =E2=80= =98RequestCheckpoint=E2=80=99 > xlogfuncs.c:56: warning: control reaches end of non-void function Yeah, such things would need to be cleaned up, of course. Thanks! Stephen --AezGfTGj77mqFsOM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJhgYLGAAoJEO1sijiDR2RVbFwQALP0TNAfEDqxomtMhKcJJN57 QYmCUo0bklbsFIuu7yivFGqmms+JR7M5fsUGSvjH4Q0dhVCzi/jKPWxBrol4Aeze 1fxmFCBBJCZPmgVKKP98IWD9ZQZIfG1ZaYmVq9MIAiR3i28/cy7qkV/oGLSY+3sv DUqyL07bzayfXCPZMoXFGMk4F3ceju80L82FjgHIMaBVDC/CCAmpLFmiffj9KmPp 1ubijYOLjhVzo6pPn1JrFj4ytjihjR4J0l+e7R+3I3Ys87dYIv9BMyyzbj46BHRQ thx3V2ZrqJdIEeLBheOOq37V+ADbzRHqio7ezpT1f0AgXRvIj5qU6bkFVNqstNOS f/ot/jlZOfTVJkIoSMTd3QMRRqV3AxsKtfSsPaqqEt0n8pbSz5Fwq1ovX+KFulUJ EbiihVx4i/akX478SMOYNBjVZ42k/3MMvD3j/rRvJEXkIIiQ+vH7iHAzWvy0w/6a JES3vXgIgy2vhpOncq3sLaPMM7Vr1KormD1Ux0SOwF35g71CubaajzriwHkc4+/7 UkUG6ghQDL/v6FT9ZvT0GGv8mpa0y9FUnYCvo7R40ugRA1fXy2Xz4j0Os+d+lqCB PivpMGHPeJiK8jNdXJuwGuHV8JEJfp9o81NKKLNDPWTosFT8g3YcLDafEVAZ/YeR X+SB43XvaFjuARDMQrGR =FMM8 -----END PGP SIGNATURE----- --AezGfTGj77mqFsOM--