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

Synchronous replication patch v4

From: "Fujii Masao" <masao(dot)fujii(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Synchronous replication patch v4
Date: 2008-11-28 02:45:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

I chaged the patch accoding to the comment against v3 and fixed
some bugs. Since I failed to post the patch because of the excess
of mail size, I would attach it to Wiki from this time.

List of updates
* Rename the database for replication from "walsender" to

* Change the way to treat "replication" database so that the normal
 client can connect and query to it. So, in order to start replication,
 it's necessary to connect to "replication" database and send the
 particular message.

* Disable skipping-WAL optimization during replication like WAL

* Push RequestXLogSend and WaitXLogSend into XLogFlush to
 simplify the code.

* Re-define replication_timeout as PGC_SUSET to prevent the
 non-superuser from stopping replication easily.

* Change the logic to forbid the startup process from trying to redo
 the WAL which walreceiver has not received yet. This happens
 when the trigger file of pg_standby is created while walreceiver
 is alive. Before the startup process get over the WAL position
 where walreceiver has not reached at yet, walreceiver certainly

* Integrate the logic to start replication between walsender and
 walreceiver in order to simplify the code.

* Change walsender and walreceiver to display the replication
 starting / ending position when replication starts / ends.

* Skip recycling the restored WAL file if it's a symbolic link.

* Re-zero the page if needed before walreceiver writes the WAL
 to disk.

* Add new trigger file option into pg_standby, which can promote
 the standby to the primary without any transaction loss.

I shelved the change for pg_standby to get over the gap of
timeline this time, because the consensus is not reached.

If you notice anything, please feel free to comment!


Fujii Masao
NTT Open Source Software Center

pgsql-hackers by date

Next:From: Fujii MasaoDate: 2008-11-28 03:27:02
Subject: Re: Comments to Synchronous replication patch v3
Previous:From: Alvaro HerreraDate: 2008-11-28 00:22:35
Subject: Re: [PATCHES] GIN improvements

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