aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/clog.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2021-06-24 10:45:23 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2021-06-24 10:45:43 +0300
commitcaac1965077ffd995dfbe9facf88c05afa868c92 (patch)
tree6747d4942ef2e9034a93c8edd033517e618aa9db /src/backend/access/transam/clog.c
parenta73bd49c69e16197e8da43bc7cb17a38bd89aeee (diff)
downloadpostgresql-caac1965077ffd995dfbe9facf88c05afa868c92.tar.gz
postgresql-caac1965077ffd995dfbe9facf88c05afa868c92.zip
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
Diffstat (limited to 'src/backend/access/transam/clog.c')
0 files changed, 0 insertions, 0 deletions