Skip site navigation (1) Skip section navigation (2)

pgsql: Fix WAL file replacement during cascading replication onWindows

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 onWindows
Date: 2012-09-06 01:58:43
Message-ID: E1T9RMh-0004JS-Sz@gemulon.postgresql.org (view raw or flat)
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
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/ab9a14e903347929d248ac4dabe2614de482350b

Modified Files
--------------
src/backend/access/transam/xlog.c |   28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 deletions(-)

pgsql-committers by date

Next:From: Peter EisentrautDate: 2012-09-06 03:09:37
Subject: pgsql: pgbench: Show better progress when loading tuples
Previous:From: Tom LaneDate: 2012-09-06 01:49:41
Subject: pgsql: Fix inappropriate error messages for Hot Standbymisconfiguratio

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group