postgresql/src/backend
Tom Lane 83f7761d84 Teach pg_ls_dir_files() to ignore ENOENT failures from stat().
Buildfarm experience shows that this function can fail with ENOENT
if some other process unlinks a file between when we read the directory
entry and when we try to stat() it.  The problem is old but we had
not noticed it until 085b6b667 added regression test coverage.

To fix, just ignore ENOENT failures.  There is one other case that
this might hide: a symlink that points to nowhere.  That seems okay
though, at least better than erroring.

Back-patch to v10 where this function was added, since the regression
test cases were too.

Discussion: https://postgr.es/m/20200308173103.GC1357@telsasoft.com
2020-03-31 12:57:55 -04:00
..
access Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:14 -07:00
bootstrap Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:14 -07:00
catalog Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:14 -07:00
commands Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:14 -07:00
executor Fix potential crash after constraint violation errors in partitioned tables. 2020-03-23 14:52:18 -07:00
foreign Abstract logic to allow for multiple kinds of child rels. 2017-04-03 22:41:31 -04:00
lib Rename rbtree.c functions to use "rbt" prefix not "rb" prefix. 2018-11-06 13:25:24 -05:00
libpq Avoid downcasing/truncation of RADIUS authentication parameters. 2019-11-13 13:41:04 -05:00
main Install Windows crash dump handler before all else. 2017-11-12 14:31:04 -08:00
nodes Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:14 -07:00
optimizer Fix typo. 2020-02-06 16:18:13 +05:30
parser Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:14 -07:00
po Translation updates 2020-02-10 13:00:18 +01:00
port Fix race condition in our Windows signal emulation. 2019-12-09 15:03:52 -05:00
postmaster Clean up properly error_context_stack in autovacuum worker on exception 2019-10-23 10:26:06 +09:00
regex Fix misoptimization of "{1,1}" quantifiers in regular expressions. 2019-05-12 18:53:41 -04:00
replication Drop slot's LWLock before returning from SaveSlotToPath() 2020-03-26 13:51:22 +01:00
rewrite Make rewriter prevent auto-updates on views with conditional INSTEAD rules. 2020-01-14 09:50:13 +00:00
snowball Initial pgindent run with pg_bsd_indent version 2.0. 2017-06-21 14:39:04 -04:00
statistics Make error logging in extended statistics more consistent 2019-05-30 17:06:35 +02:00
storage Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:14 -07:00
tcop Stabilize NOTIFY behavior by transmitting notifies before ReadyForQuery. 2019-11-24 14:42:59 -05:00
tsearch Suppress warning from older compilers. 2019-11-03 16:10:56 -05:00
utils Teach pg_ls_dir_files() to ignore ENOENT failures from stat(). 2020-03-31 12:57:55 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Add ICU_CFLAGS to global CPPFLAGS 2017-06-12 15:57:22 -04:00
Makefile Fix make rules that generate multiple output files. 2018-03-23 13:45:38 -04:00
nls.mk Translation updates 2018-05-07 11:59:42 -04:00