Re: GetRelationPath() vs critical sections
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Andy Fan <zhihuifan1213@163.com>,
pgsql-hackers@postgresql.org, Noah Misch <noah@leadboat.com>,
Michael Paquier <michael.paquier@gmail.com>
Date: 2025-02-21T05:35:14Z
Lists: pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes: > On Fri, Feb 21, 2025 at 9:28 AM Andres Freund <andres@anarazel.de> wrote: >> The patch curently uses a hardcoded 6 for the length of MAX_BACKENDS. Does >> anybody have a good idea for how to either >> >> a) derive 6 from MAX_BACKENDS in a way that can be used in a C array size This all seems quite over-the-top to me. Just allocate 10 characters, which is certainly enough for the output of a %u format spec, and call it good. (Yeah, I know that's not as much fun, but ...) regards, tom lane
Commits
-
Change _mdfd_segpath() to return paths by value
- ecbff4378bee 18.0 landed
-
Change relpath() et al to return path by value
- 37c87e63f9e1 18.0 landed