postgresql/src
Tom Lane 561885db05 Improve error handling in RemovePgTempFiles().
Modify this function and its subsidiaries so that syscall failures are
reported via ereport(LOG), rather than silently ignored as before.
We don't want to throw a hard ERROR, as that would prevent database
startup, and getting rid of leftover temporary files is not important
enough for that.  On the other hand, not reporting trouble at all
seems like an odd choice not in line with current project norms,
especially since any failure here is quite unexpected.

On the same reasoning, adjust these functions' AllocateDir/ReadDir calls
so that failure to scan a directory results in LOG not ERROR.  I also
removed the previous practice of silently ignoring ENOENT failures during
directory opens --- there are some corner cases where that could happen
given a previous database crash, but that seems like a bad excuse for
ignoring a condition that isn't expected in most cases.  A LOG message
during postmaster start seems OK in such situations, and better than
no output at all.

In passing, make RemovePgTempRelationFiles' test for "is the file name
all digits" look more like the way it's done elsewhere.

Discussion: https://postgr.es/m/19907.1512402254@sss.pgh.pa.us
2017-12-04 17:59:35 -05:00
..
backend Improve error handling in RemovePgTempFiles(). 2017-12-04 17:59:35 -05:00
bin pg_basebackup: Fix progress messages when writing to a file 2017-12-01 09:21:34 -05:00
common Change TRUE/FALSE to true/false 2017-11-08 11:37:28 -05:00
fe_utils Exclude flex-generated code from coverage testing 2017-10-16 16:28:11 -04:00
include Clean up assorted messiness around AllocateDir() usage. 2017-12-04 17:02:56 -05:00
interfaces Check channel binding flag at end of SCRAM exchange 2017-12-01 09:53:26 -05:00
makefiles Always use -fPIC, not -fpic, when building shared libraries with gcc. 2017-06-01 13:32:55 -04:00
pl Fix uninitialized-variable compiler warning induced by commit e4128ee76. 2017-12-03 11:25:17 -05:00
port Rewrite strnlen replacement implementation from 8a241792f9. 2017-10-10 14:50:30 -07:00
template Force "restrict" not to be used when compiling with xlc. 2017-10-13 12:15:06 -07:00
test When VACUUM or ANALYZE skips a concurrently dropped table, log it. 2017-12-04 15:25:55 -05:00
timezone Clean up assorted messiness around AllocateDir() usage. 2017-12-04 17:02:56 -05:00
tools Add infrastructure for sharing temporary files between backends. 2017-12-01 16:30:56 -08:00
tutorial Distinguish selectivity of < from <= and > from >=. 2017-09-13 11:12:39 -04:00
.gitignore
DEVELOPERS
Makefile Build src/test/isolation during "make" and "make install". 2017-11-22 20:18:15 -08:00
Makefile.global.in Convert documentation to DocBook XML 2017-11-23 09:44:28 -05:00
Makefile.shlib Remove support for bcc and msvc standalone libpq builds 2017-04-11 15:22:21 +02:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00