Re: master in standby mode croaks

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: master in standby mode croaks
Date: 2010-04-19 21:58:23
Message-ID: v2m603c8f071004191458o94f5dd2ftb7b56b1f1e3fda6d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Apr 19, 2010 at 5:31 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Mon, Apr 19, 2010 at 11:04 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>> First of all, I wonder why the latter two need to affect the decision of
>>> whether additional information is written to WAL for HS. How about just
>>> removing XLogIsNeeded() condition from XLogStandbyInfoActive()?
>>
>> Bad idea, I think.  If XLogIsNeeded() is returning false and
>> XLogStandbyInfoActive() is returning true, the resulting WAL will
>> still be unusable for HS, at least AIUI.
>
> Probably No. Such a WAL will be usable for HS unless an unlogged
> operation (e.g., CLUSTER, CREATE TABLE AS SELECT, etc) happens.
> I think that the occurrence of an unlogged operation rather than
> XLogIsNeeded() itself must be checked in the standby, it's already
> been being checked. So just removing XLogIsNeeded() condition makes
> sense to me.

I think that's a bad idea. Currently we have three possible types of
WAL-logging:

- just enough for crash recovery (archive_mode=off and max_wal_senders=0)
- enough for log-shipping replication (archive_mode=on or
max_wal_senders>0, but recovery_connections=off)
- enough for log-shipping replication + hot standby (archive_mode=on
or max_wal_senders>0, plus recovery_connections=on)

I'm not eager to add a fourth category where hot standby works unless
you do any of the things that break log-streaming in general. That
seems hopelessly fragile and also fairly pointless.

...Robert

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-04-19 22:03:06 Re: Thoughts on pg_hba.conf rejection
Previous Message Robert Haas 2010-04-19 21:52:56 Re: Thoughts on pg_hba.conf rejection