On Wed, Dec 7, 2022 at 7:15 AM Andres Freund <andres@anarazel.de> wrote:
> On 2022-11-08 01:16:09 +1300, Thomas Munro wrote:
> > So [1] on its own didn't fix this. My next guess is that the attached
> > might help.
> What is our plan here? This afaict is the most common "false positive" for
> cfbot in the last weeks.
That branch hasn't failed on cfbot[1], except once due to one of the
other known flapping races we have to fix. Which doesn't prove
anything, of course, but it is encouraging. I wish we knew why the
test does this, though....
Here's a better version that works harder to avoid opening more than
one fd at a time (like the pgfnames()-based code it replaces), and
also uses fd.c facilities in the backend version (unlike pgfnames(),
which looks like it could leak a descriptor if palloc() threw, and
also doesn't know how to handle file descriptor pressure).
[1] https://cirrus-ci.com/github/postgresql-cfbot/postgresql/commitfest/41/4011