postgresql/src
Heikki Linnakangas caac196507 Prevent race condition while reading relmapper file.
Contrary to the comment here, POSIX does not guarantee atomicity of a
read(), if another process calls write() concurrently. Or at least Linux
does not. Add locking to load_relmap_file() to avoid the race condition.

Fixes bug #17064. Thanks to Alexander Lakhin for the report and test case.

Backpatch-through: 9.6, all supported versions.
Discussion: https://www.postgresql.org/message-id/17064-bb0d7904ef72add3@postgresql.org
2021-06-24 10:45:43 +03:00
..
backend Prevent race condition while reading relmapper file. 2021-06-24 10:45:43 +03:00
bin Work around portability issue with newer versions of mktime(). 2021-06-13 14:32:42 -04:00
common Fix command-line colorization on Windows with VT100-compatible environments 2020-03-02 15:46:24 +09:00
fe_utils Fix incautious handling of possibly-miscoded strings in client code. 2021-06-07 14:15:25 -04:00
include Fix decoding of speculative aborts. 2021-06-15 08:50:12 +05:30
interfaces Don't assume GSSAPI result strings are null-terminated. 2021-06-23 14:01:32 -04:00
makefiles Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:35 -04:00
pl Restore the portal-level snapshot for simple expressions, too. 2021-06-22 17:48:39 -04:00
port Add fallback implementation for setenv() 2021-06-01 09:27:31 +09:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:35 -05:00
test Allow non-quoted identifiers as isolation test session/step names. 2021-06-23 18:41:39 -04:00
timezone Update time zone data files to tzdata release 2021a. 2021-01-24 16:29:47 -05:00
tools Add fallback implementation for setenv() 2021-06-01 09:27:31 +09:00
tutorial tutorial: land height is "elevation", not "altitude" 2021-03-10 20:25:18 -05:00
.gitignore
DEVELOPERS
Makefile
Makefile.global.in Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:35 -04:00
Makefile.shlib
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:05:50 +02:00