Re: Condition to become the standby mode.

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Condition to become the standby mode.
Date: 2013-08-07 18:19:00
Message-ID: CAHGQGwEvd2sobwFa7013bDkxbLhxVwOm4Qvm4+ZNpsNNH+SPew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jul 27, 2013 at 12:51 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Fri, Jul 26, 2013 at 11:55 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
>> On 2013-07-26 23:47:59 +0900, Fujii Masao wrote:
>>> >> If this problem is solved, there is possible of that we can failback
>>> >> by removing the all WAL record which is in pg_xlog before server
>>> >> starts as the slave server.
>>> >> ( And we also use "synchronous_transfer" which I'm proposing, I think
>>> >> we can fail-back without taking full backup surely)
>>> >
>>> > I still have *massive* doubts about the concept. But anyway, if you want
>>> > to do so, you should generate a backup label that specifies the startup
>>> > location.
>>>
>>> Generating a backup label doesn't seem to be enough because there is
>>> no backup-end WAL record and we cannot know the consistency point.
>>
>> Since 9.2 we allow generation of base backups from standbys, the
>> infrastructure built for should be sufficient to pass the lsn at which
>> consistency is achieved.
>
> Yeah, right. I'd forgotten about that.

On the second thought, using such an infrastructure seems not enough for
this issue. When we start new standby from the backup taken from another
standby, we use pg_control's min recovery point as the consistency point.

When we use this technique for the issue that Sawada raised, we will get
one problem that pg_control's min recovery point is zero because it's
pg_control under the master. The master doesn't update min recovery
point in pg_control. Only the standby updates it.

Therefore, we would need to find another way for the issue.

Regards,

--
Fujii Masao

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2013-08-07 18:38:36 Re: StrategyGetBuffer optimization, take 2
Previous Message Thom Brown 2013-08-07 18:04:43 Re: 9.4 regression