pgsql: Before exiting walreceiver, fsync() all the WAL received.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Before exiting walreceiver, fsync() all the WAL received.
Date: 2011-01-17 10:29:37
Message-ID: E1PemLB-00079y-5p@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Before exiting walreceiver, fsync() all the WAL received.

Otherwise WAL recovery will replay the un-flushed WAL after walreceiver has
exited, which can lead to a non-recoverable standby if the system crashes hard
at that point.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=1435a8554cd514d668a46c4f6b1e4a1e3bd30fd5

Modified Files
--------------
src/backend/replication/walreceiver.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2011-01-17 10:43:43 pgsql: Set fallback_application_name in walreceiver
Previous Message Heikki Linnakangas 2011-01-17 10:28:02 pgsql: Before exiting walreceiver, fsync() all the WAL received.