pgsql: Cascading replication feature for streaming log-based replicatio

Lists: pgsql-committerspgsql-hackers
From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Cascading replication feature for streaming log-based replicatio
Date: 2011-07-19 02:44:09
Message-ID: E1Qj0I5-0004Sa-05@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Cascading replication feature for streaming log-based replication.
Standby servers can now have WALSender processes, which can work with
either WALReceiver or archive_commands to pass data. Fully updated
docs, including new conceptual terms of sending server, upstream and
downstream servers. WALSenders terminated when promote to master.

Fujii Masao, review, rework and doc rewrite by Simon Riggs

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5286105800c7d5902f98f32e11b209c471c0c69c

Modified Files
--------------
doc/src/sgml/config.sgml | 127 ++++++++++------
doc/src/sgml/high-availability.sgml | 62 ++++++++-
src/backend/access/transam/xlog.c | 265 +++++++++++++++++++--------------
src/backend/postmaster/postmaster.c | 20 +++
src/backend/replication/basebackup.c | 5 +
src/backend/replication/syncrep.c | 7 +
src/backend/replication/walreceiver.c | 7 +-
src/backend/replication/walsender.c | 108 ++++++++++---
src/include/access/xlog.h | 6 +-
src/include/replication/walsender.h | 5 +-
10 files changed, 423 insertions(+), 189 deletions(-)


From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Cascading replication feature for streaming log-based replicatio
Date: 2011-07-19 06:31:30
Message-ID: CAHGQGwFAGZKxxMt=EGcxhhD+G8NpeeQ6Hew3Nqp69BpXity16A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Tue, Jul 19, 2011 at 11:44 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> Cascading replication feature for streaming log-based replication.
> Standby servers can now have WALSender processes, which can work with
> either WALReceiver or archive_commands to pass data. Fully updated
> docs, including new conceptual terms of sending server, upstream and
> downstream servers. WALSenders terminated when promote to master.
>
> Fujii Masao, review, rework and doc rewrite by Simon Riggs

Thanks a lot for the commit!

You added new GUC category "Sending Server(s)" into the doc. According to
this change, we need to change also guc.c and postgresql.conf.sample.
Attached patch does that.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment Content-Type Size
new_guc_category_v1.patch text/x-patch 4.2 KB

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Cascading replication feature for streaming log-based replicatio
Date: 2011-07-19 08:08:34
Message-ID: CA+U5nM+DzCkG8+c9DiCZpW5cFnnSJX4W_FFBAc1gOwNDpMdZew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Tue, Jul 19, 2011 at 7:31 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Tue, Jul 19, 2011 at 11:44 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>> Cascading replication feature for streaming log-based replication.
>> Standby servers can now have WALSender processes, which can work with
>> either WALReceiver or archive_commands to pass data. Fully updated
>> docs, including new conceptual terms of sending server, upstream and
>> downstream servers. WALSenders terminated when promote to master.
>>
>> Fujii Masao, review, rework and doc rewrite by Simon Riggs
>
> Thanks a lot for the commit!
>
> You added new GUC category "Sending Server(s)" into the doc. According to
> this change, we need to change also guc.c and postgresql.conf.sample.
> Attached patch does that.

Applied

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


From: Thom Brown <thom(at)linux(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Cascading replication feature for streaming log-based replicatio
Date: 2011-10-08 12:59:45
Message-ID: CAA-aLv4Fs+YywoHjN20aPWn0kMe7jOsM65wVC9ZicQz2VutacQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On 19 July 2011 03:44, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> Cascading replication feature for streaming log-based replication.
> Standby servers can now have WALSender processes, which can work with
> either WALReceiver or archive_commands to pass data. Fully updated
> docs, including new conceptual terms of sending server, upstream and
> downstream servers. WALSenders terminated when promote to master.
>
> Fujii Masao, review, rework and doc rewrite by Simon Riggs

I've only just started looking at this.

In doc/src/sgml/config.sgml:

Note that in addition to these parameters,
<xref linkend="guc-wal-level"> must be set appropriately on the master
server, and may also want to enable WAL archiving as
well (see <xref linkend="runtime-config-wal-archiving">).

s/and may also/and you may also/

In doc/src/sgml/high-availability.sgml:

s/effected/affected/

Also: "i.e., set max_wal_senders, hot_standby and authentication option"

Doesn't sound right. Perhaps something like "... and configure
host-based authentication"

In src/backend/postmaster/postmaster.c:

(errmsg("terminating walsender all processes to force cascaded"
"standby(s) to update timeline and reconnect")));

s/walsender all/all walsender/

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Thom Brown <thom(at)linux(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Cascading replication feature for streaming log-based replicatio
Date: 2011-10-10 14:18:08
Message-ID: CA+TgmobapeewxFm9byPB0dO+3UpmkExmmmFrMhqhcMhr-QtUPw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Sat, Oct 8, 2011 at 8:59 AM, Thom Brown <thom(at)linux(dot)com> wrote:
> s/and may also/and you may also/

This was already fixed in a later commit.

> In doc/src/sgml/high-availability.sgml:
>
> s/effected/affected/

I fixed this.

> Also: "i.e., set max_wal_senders, hot_standby and authentication option"
>
> Doesn't sound right.  Perhaps something like "... and configure
> host-based authentication"

I reworded this. See what you think.

> In src/backend/postmaster/postmaster.c:
>
> (errmsg("terminating walsender all processes to force cascaded"
>        "standby(s) to update timeline and reconnect")));
>
> s/walsender all/all walsender/

This has also been subsequently fixed. Nothing to see here, folks.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Thom Brown <thom(at)linux(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Cascading replication feature for streaming log-based replicatio
Date: 2011-10-10 14:20:17
Message-ID: CAA-aLv7Bx8U9O38upN96GAth2ppdWN8FdjhYyS8tJofUuB75pQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On 10 October 2011 15:18, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Sat, Oct 8, 2011 at 8:59 AM, Thom Brown <thom(at)linux(dot)com> wrote:
>> s/and may also/and you may also/
>
> This was already fixed in a later commit.
>
>> In doc/src/sgml/high-availability.sgml:
>>
>> s/effected/affected/
>
> I fixed this.
>
>> Also: "i.e., set max_wal_senders, hot_standby and authentication option"
>>
>> Doesn't sound right.  Perhaps something like "... and configure
>> host-based authentication"
>
> I reworded this.  See what you think.
>
>> In src/backend/postmaster/postmaster.c:
>>
>> (errmsg("terminating walsender all processes to force cascaded"
>>        "standby(s) to update timeline and reconnect")));
>>
>> s/walsender all/all walsender/
>
> This has also been subsequently fixed.  Nothing to see here, folks.

Ah, didn't spot that some of this had already been addressed. Looks
good to me. Cheers.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company