Fix read_relmap_file() concurrency on Windows.
Robert Haas <rhaas@postgresql.org>
Fix read_relmap_file() concurrency on Windows. Commit d8cd0c6c95c0120168df93aae095df4e0682a08a introduced a file rename that could fail on Windows, probably due to other backends having an open file handle to the old file of the same name. Re-arrange the locking slightly to prevent that, by making sure the open() and close() run while we hold the lock. Thomas Munro. I added an explanatory comment. Discussion: https://postgr.es/m/CA%2BhUKGLZtCTgp4NTWV-wGbR2Nyag71%3DEfYTKjDKnk%2BfkhuFMHw%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/cache/relmapper.c | modified | +21 −13 |
Discussion
- pgsql: Remove the restriction that the relmap must be 512 bytes. 16 messages · 2022-07-26 → 2022-07-27