From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix WAL file replacement during cascading replication on Windows |
Date: | 2012-09-06 01:58:43 |
Message-ID: | E1T9RMh-0004JU-Tj@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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.
Branch
------
REL9_2_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/4b8dacfcef7ad16939ec8695019747fb45a80847
Modified Files
--------------
src/backend/access/transam/xlog.c | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2012-09-06 03:09:37 | pgsql: pgbench: Show better progress when loading tuples |
Previous Message | Tom Lane | 2012-09-06 01:49:41 | pgsql: Fix inappropriate error messages for Hot Standby misconfiguratio |