Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed at end-of-transaction - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed at end-of-transaction
Date
Msg-id 11882.1585672910@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed atend-of-transaction  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed at end-of-transaction  (Alexander Lakhin <exclusion@gmail.com>)
List pgsql-hackers
Justin Pryzby <pryzby@telsasoft.com> writes:
> I suggest to leave stat() alone in your patch for stable releases.  I think
> it's okay if we change behavior so that a broken symlink is skipped instead of
> erroring (as a side effect of skipping ENOENT with stat()).  But not okay if we
> change pg_ls_logdir() to hide symlinks in back braches.

Meh.  I'm not really convinced, but in the absence of anyone expressing
support for my position, I'll do it that way.  I don't think it's worth
doing both a stat and lstat to tell the difference between file-is-gone
and file-is-a-broken-symlink.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Alexey Bashtanov
Date:
Subject: Re: Less-silly selectivity for JSONB matching operators
Next
From: James Coleman
Date:
Subject: Re: [PATCH] Incremental sort (was: PoC: Partial sort)