Re: GetRelationPath() vs critical sections

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Andy Fan <zhihuifan1213@163.com>, pgsql-hackers@postgresql.org, Noah Misch <noah@leadboat.com>, Michael Paquier <michael.paquier@gmail.com>
Date: 2025-02-22T00:42:35Z
Lists: pgsql-hackers
On Sat, Feb 22, 2025 at 1:30 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> procnumber.h seems like the right place, at least without a separate
> discussion of the ramifications of making it configurable, no?  (I
> thought there were ideas about squeezing it down to 16 bits so you
> could jam two of 'em into an atomic uint32_t for list headers or
> something like that, off-topic here except to say that it seems to
> conflict with the idea of making it user-increasable?)

(Please ignore this comment, I'll comment on the other thread instead.
Sorry I hadn't seen your patches over there yet: when I started
talking about the definition and assertions around MAX_BACKENDS in
here, it had jumped out at me independently while trying to answer
your question about compile-time log10 stuff, because I also noticed
that we sucked even at codifying the log2 constraints.)



Commits

  1. Change _mdfd_segpath() to return paths by value

  2. Change relpath() et al to return path by value