Update of replication/README

Lists: pgsql-hackers
From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Update of replication/README
Date: 2011-03-09 11:11:17
Message-ID: AANLkTin3PPOwXq2Cpf+tLNNKSv4OmHfDn5qr0aoeczA-@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

The attached patch updates replication/README to reflect current
walsender/walreceiver behavior. It doesn't include any description
about sync rep. That would need to be added later.

Regards,

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

Attachment Content-Type Size
replication_readme_v1.patch application/octet-stream 4.1 KB

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Update of replication/README
Date: 2011-03-09 17:00:46
Message-ID: AANLkTimHzxEhgiCKDAtxE8pATkK+z_prz-adin1Yammh@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Mar 9, 2011 at 6:11 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> The attached patch updates replication/README to reflect current
> walsender/walreceiver behavior. It doesn't include any description
> about sync rep. That would need to be added later.

Hrm. What about this hunk?

-Each walsender allocates an entry from the WalSndCtl array, and advertises
-there how far it has streamed WAL already. This is used at checkpoints, to
-avoid recycling WAL that hasn't been streamed to a slave yet. However,
-that doesn't stop such WAL from being recycled when the connection is not
-established.
+Each walsender allocates an entry from the WalSndCtl array, and tracks
+information about replication progress. User can monitor them via
+statistics views.

Is the deleted text not (or no longer) true?

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


From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Update of replication/README
Date: 2011-03-10 02:01:15
Message-ID: AANLkTikjKmK_derfSYd7vbtvex=031NKrf6bRG_WcFDa@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Mar 10, 2011 at 2:00 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Wed, Mar 9, 2011 at 6:11 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>> The attached patch updates replication/README to reflect current
>> walsender/walreceiver behavior. It doesn't include any description
>> about sync rep. That would need to be added later.
>
> Hrm.  What about this hunk?
>
> -Each walsender allocates an entry from the WalSndCtl array, and advertises
> -there how far it has streamed WAL already. This is used at checkpoints, to
> -avoid recycling WAL that hasn't been streamed to a slave yet. However,
> -that doesn't stop such WAL from being recycled when the connection is not
> -established.
> +Each walsender allocates an entry from the WalSndCtl array, and tracks
> +information about replication progress. User can monitor them via
> +statistics views.
>
> Is the deleted text not (or no longer) true?

Yes. But, in fact, the deleted text is false in not only 9.1dev but
also 9.0. IIRC,
though my original patch of streaming replication prevented checkpoint from
recycling unsent WAL files, that behavior was cut out and we introduced
wal_keep_segments parameter before release of 9.0. But unfortunately I had
not noticed that text until I read README yesterday...

Regards,

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


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Update of replication/README
Date: 2011-03-10 14:00:47
Message-ID: AANLkTi=GuBf1aj38jih5gTLa5aE4hLDv0sJmYcS=ScJ1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Mar 9, 2011 at 9:01 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Thu, Mar 10, 2011 at 2:00 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> On Wed, Mar 9, 2011 at 6:11 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>>> The attached patch updates replication/README to reflect current
>>> walsender/walreceiver behavior. It doesn't include any description
>>> about sync rep. That would need to be added later.
>>
>> Hrm.  What about this hunk?
>>
>> -Each walsender allocates an entry from the WalSndCtl array, and advertises
>> -there how far it has streamed WAL already. This is used at checkpoints, to
>> -avoid recycling WAL that hasn't been streamed to a slave yet. However,
>> -that doesn't stop such WAL from being recycled when the connection is not
>> -established.
>> +Each walsender allocates an entry from the WalSndCtl array, and tracks
>> +information about replication progress. User can monitor them via
>> +statistics views.
>>
>> Is the deleted text not (or no longer) true?
>
> Yes. But, in fact, the deleted text is false in not only 9.1dev but
> also 9.0. IIRC,
> though my original patch of streaming replication prevented checkpoint from
> recycling unsent WAL files, that behavior was cut out and we introduced
> wal_keep_segments parameter before release of 9.0. But unfortunately I had
> not noticed that text until I read README yesterday...

OK, committed.

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