diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2021-06-24 10:45:23 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2021-06-24 10:45:23 +0300 |
commit | b6d8d2073f228d9f7198f1f9826d8f6ab643c219 (patch) | |
tree | b6b9ab37b76c5d16c63cf92d7f4c2f8ced1d3b5f /src/backend/access/gist/gistutil.c | |
parent | f08722cf83ab1fabee948a4e5754bf6236ad700b (diff) | |
download | postgresql-b6d8d2073f228d9f7198f1f9826d8f6ab643c219.tar.gz postgresql-b6d8d2073f228d9f7198f1f9826d8f6ab643c219.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/gist/gistutil.c')
0 files changed, 0 insertions, 0 deletions