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:52 +0300 |
commit | 85ae8ccb2fb330785c6503316635dc7256cbe495 (patch) | |
tree | 51647123bbf8d687099d684ea9b36edee8bd45c6 /src/tutorial/advanced.source | |
parent | 4be39ef9cbc5afc6078bdf9253e5981da6e0cf5f (diff) |
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/tutorial/advanced.source')
0 files changed, 0 insertions, 0 deletions