Re: Hot standby doesn't come up on some situation. - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject Re: Hot standby doesn't come up on some situation.
Date
Msg-id CAM103DtDLgBz24WDYojuxiT8qij+Fz2KfF3oRC4aXKihWYv1QQ@mail.gmail.com
Whole thread Raw
In response to Re: Hot standby doesn't come up on some situation.  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Hot standby doesn't come up on some situation.  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
<p dir="ltr">Hello,<p dir="ltr">2014/02/28 18:07 "Andres Freund" :<br /> ><br /> > On 2014-02-28 17:55:21 +0900,
KyotaroHORIGUCHI wrote:<br /> > > The recovery process stays on 'incosistent' state forever when<br /> > >
theserver has crashed before any wal record is inserted after<br /> > > the last checkpoint.<br /> ><br />
>> # killall postgres<br /> > > # rm -rf $PGDATA/*<br /> > > initdb<br /> > > pg_ctl start
-w<br/> > > sleep 1<br /> > > pg_ctl stop -m i<br /> > > cat > $PGDATA/recovery.conf
<<EOF<br/> > > standby_mode = 'on'<br /> > > primary_conninfo = 'host=localhost port=9999
user=repuserapplication_name=pm01 keepalives_idle=60 keepalives_interval=5 keepalives_count=5'<br /> > >
#restore_command= '/bin/true'<br /> > > recovery_target_timeline = 'latest'<br /> > > EOF<br /> > >
cat>> $PGDATA/postgresql.conf <<EOF<br /> > > #log_min_messages = debug5<br /> > > hot_standby
=on<br /> > > EOF<br /> > > pg_ctl start<br /> ><br /> > Uh. So, if I understand correctly, what you
didis to convert a normal<br /> > live pg, into a replica that doesn't have a upstream node, right?<p dir="ltr">Yes,
butthe same stuation could be made by restarting crashed secondary. I didn't tried it since my console is far behind
now...<pdir="ltr">Can a restart of secondry after crashing just after the completion of restartpoint with no further
recordsmake the same situation?<p dir="ltr">I have no idea about the scenario on whitch this behavior was regarded as
undesirablebut anyway I think that the secondry should start accepting client just after crash recovery is completed.<p
dir="ltr">>Normally the primary will just do an additional write shortly<br /> > afterwards, resolving this
situation?<pdir="ltr">Maybe so. I haven't tried though.<p dir="ltr">regards,<br /> -- <br /> Kyotaro Horiguchi<br />
NTTOpensource Software Center<br /> 

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Hot standby doesn't come up on some situation.
Next
From: Dimitri Fontaine
Date:
Subject: Re: extension_control_path