pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: predefined role(s) for VACUUM and ANALYZE
Date: Fri, 30 Sep 2022 15:32:57 -0700
Message-ID: <20220930223257.GA190214@nathanxps13> (raw)
In-Reply-To: <742523.1664575253@sss.pgh.pa.us>
References: <20220920235010.GB378596@nathanxps13>
	<Yyppg/c4SB7s1IAv@paquier.xyz>
	<20220921043126.GA382738@nathanxps13>
	<20220928185034.GA1397229@nathanxps13>
	<CAOuzzgpQtdqj2BfwheD9+fjUnVSo1cmdrQmwcr-qbvKjC5cfyg@mail.gmail.com>
	<20220928201222.GA1400058@nathanxps13>
	<20220930192350.GA171832@nathanxps13>
	<678838.1664568924@sss.pgh.pa.us>
	<20220930214728.GA177925@nathanxps13>
	<742523.1664575253@sss.pgh.pa.us>

On Fri, Sep 30, 2022 at 06:00:53PM -0400, Tom Lane wrote:
> Nathan Bossart <nathandbossart@gmail.com> writes:
>> The main one I see is AclItem, which increases from 12 bytes to 16 bytes.
> 
> ... and now requires double alignment ... did you fix its typalign?

Nope, I missed that, thanks for pointing it out.  Should we move ai_privs
to the beginning of the struct, too?  The only other similar example I see
is TimeTzADT, but that only consists of an int64 and an int32, while
AclItem starts with 2 uint32s.  While it might not be strictly necessary,
it seems like there is a small chance it could become necessary in the
future.

> We could conceivably dodge the alignment increase by splitting the 64-bit
> field into two 32-bit fields, one for base privileges and one for grant
> options.  That'd be rather invasive, so unless it leads to pleasant
> improvements in readability (which it might, perhaps) I wouldn't advocate
> for it.

Yeah, the invasiveness is the main reason I haven't tried this yet, but it
does seem like it'd improve readability.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com





view thread (63+ messages)  latest in thread

Message-ID: <20220930223257.GA190214@nathanxps13>
Permalink:  ../20220930223257.GA190214@nathanxps13/
Also on:    postgresql.org/message-id/20220930223257.GA190214@nathanxps13

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, tgl@sss.pgh.pa.us, sfrost@snowman.net, bharath.rupireddyforpostgres@gmail.com, david.g.johnston@gmail.com, horikyota.ntt@gmail.com, michael@paquier.xyz, robertmhaas@gmail.com
  Subject: Re: predefined role(s) for VACUUM and ANALYZE
  In-Reply-To: <20220930223257.GA190214@nathanxps13>

* 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