public inbox for [email protected]  
help / color / mirror / Atom feed
From: Noah Misch <[email protected]>
To: Thomas Munro <[email protected]>
Cc: Heikki Linnakangas <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: vignesh C <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: pgsql-hackers <[email protected]>
Cc: Melanie Plageman <[email protected]>
Subject: Re: Relation bulk write facility
Date: Sat, 24 Feb 2024 12:26:12 -0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+hUKG+NO4-1Fbg9+-DQEekqeLtcwGm9KNGyBTW3HiReY9vnwg@mail.gmail.com>
References: <CALDaNm0WYTR4mnvb8nRCWBinFw1kP9x0aSqmdswHj_Nr50YQug@mail.gmail.com>
	<[email protected]>
	<CAHut+Pt3WatNznD8q4wmm1GSR7vAHLNBmHERAmguH9N9LCBx1Q@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CA+hUKGKtVazR0yEDxOrZYAmeaVbvQxNXSb6K8BDYOtuRVnCMDQ@mail.gmail.com>
	<[email protected]>
	<CA+hUKGJ8oBeNA_FJj9FwdVsnHCoSyWtoqkwepws+zsoKVEitTA@mail.gmail.com>
	<CA+hUKG+NO4-1Fbg9+-DQEekqeLtcwGm9KNGyBTW3HiReY9vnwg@mail.gmail.com>

On Sun, Feb 25, 2024 at 09:13:47AM +1300, Thomas Munro wrote:
> On Sun, Feb 25, 2024 at 9:12 AM Thomas Munro <[email protected]> wrote:
> > On Sun, Feb 25, 2024 at 8:50 AM Noah Misch <[email protected]> wrote:
> > > On GNU/Linux x64, gcc correctly records alignment=2**12 for the associated
> > > section (.rodata for bulk_write.o zero_buffer, .bss for pg_prewarm.o
> > > blockbuffer).  If I'm reading this right, neither AIX gcc nor xlc is marking
> > > the section with sufficient alignment, in bulk_write.o or pg_prewarm.o:
> >
> > Ah, that is a bit of a hazard that we should probably document.
> >
> > I guess the ideas to fix this would be: use smgrzeroextend() instead
> > of this coding, and/or perhaps look at the coding of pg_pwrite_zeros()
> > (function-local static) for any other place that needs such a thing,
> > if it would be satisfied by function-local scope?

True.  Alternatively, could arrange for "#define PG_O_DIRECT 0" on AIX, which
disables the alignment assertions (and debug_io_direct).

> Erm, wait, how does that function-local static object work differently?

I don't know specifically, but I expect they're different parts of the gcc
implementation.  Aligning an xcoff section may entail some xcoff-specific gcc
component.  Aligning a function-local object just changes the early
instructions of the function; it's independent of the object format.






view thread (34+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Relation bulk write facility
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox