Re: "buffer too small" or "path too long"? - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: "buffer too small" or "path too long"?
Date
Msg-id Yqpv6ZIGErxl1+Ke@paquier.xyz
Whole thread Raw
In response to Re: "buffer too small" or "path too long"?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Jun 15, 2022 at 02:02:03PM -0400, Tom Lane wrote:
> Yeah, that was what was bugging me about this proposal.  Removing
> one function's dependency on MAXPGPATH isn't much of a step forward.

This comes down to out-of-memory vs path length at the end.  Changing
only the paths of make_outputdirs() without touching all the paths in
check.c and the one in function.c does not sound good to me, as this
increases the risk of failing pg_upgrade in the middle, and that's
what we should avoid, as said upthread.

> I note also that the patch leaks quite a lot of memory (a kilobyte or
> so per pathname, IIRC).  That's probably negligible in this particular
> context, but anyplace that was called more than once per program run
> would need to be more tidy.

Surely.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: better page-level checksums
Next
From: Michael Paquier
Date:
Subject: Re: Small TAP improvements