diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2012-09-05 18:10:15 -0700 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2012-09-05 18:52:12 -0700 |
commit | ab9a14e903347929d248ac4dabe2614de482350b (patch) | |
tree | 09688dad61a59a2fbb96b7159d72eb09f3745bed /src/backend/utils/adt/xml.c | |
parent | 2e0cc1f031387fc304d11e55df0f9566d91698ff (diff) | |
download | postgresql-ab9a14e903347929d248ac4dabe2614de482350b.tar.gz postgresql-ab9a14e903347929d248ac4dabe2614de482350b.zip |
Fix WAL file replacement during cascading replication on Windows.
When the startup process restores a WAL file from the archive, it deletes
any old file with the same name and renames the new file in its place. On
Windows, however, when a file is deleted, it still lingers as long as a
process holds a file handle open on it. With cascading replication, a
walsender process can hold the old file open, so the rename() in the startup
process would fail. To fix that, rename the old file to a temporary name, to
make the original file name available for reuse, before deleting the old
file.
Diffstat (limited to 'src/backend/utils/adt/xml.c')
0 files changed, 0 insertions, 0 deletions