Re: BUG #14109: pg_rewind fails to update target control file in one scenario
От | John Lumby |
---|---|
Тема | Re: BUG #14109: pg_rewind fails to update target control file in one scenario |
Дата | |
Msg-id | COL131-W5403F755BF3290F32B1E62A3620@phx.gbl обсуждение исходный текст |
Ответ на | Re: BUG #14109: pg_rewind fails to update target control file in one scenario (Michael Paquier <michael.paquier@gmail.com>) |
Ответы |
Re: BUG #14109: pg_rewind fails to update target control file
in one scenario
|
Список | pgsql-bugs |
Thanks Michael=2C=0A= =0A= After the pg_rewind in the scenario I described=2C =0A= =0A= 1) on System B (new Primary) I see=0A= =0A= Sat Apr 23 14:19:18 EDT 2016=0A= =0A= control file indicates =0A= last check point WAL id : 0000000C00000009000000A3=0A= =0A= =A0client_addr |=A0=A0=A0=A0=A0=A0=A0=A0 backend_start=A0=A0=A0=A0=A0=A0=A0= =A0 |=A0 state=A0 | sent_location | write_location | flush_location | repla= y_location =0A= -------------+-------------------------------+---------+---------------+---= -------------+----------------+-----------------=0A= =A010.19.0.1=A0=A0 | 2016-04-23 18:19:50.812509+00 | startup | 9/A30000D0= =A0=A0=A0 | 9/A30000D0=A0=A0=A0=A0 | 9/A30000D0=A0=A0=A0=A0 | 9/A30000D0=0A= =0A= =0A= 2) whereas on System A after pg_rewind=A0 I see=0A= =0A= Sat Apr 23 14:19:54 EDT 2016=0A= =0A= control file indicates =0A= =0A= last check point WAL id : 0000000B00000009000000A3=0A= =0A= =A0pg_last_xlog_receive_location() =2C pg_last_xlog_replay_location() indic= ates=0A= =0A= =A0pg_last_xlog_receive_location | pg_last_xlog_replay_location =0A= -------------------------------+------------------------------=0A= =A09/A3000000=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 | 9/= A30000D0=0A= (1 row)=0A= =0A= Note the difference in timeline=0A= =0A= and then=2C=A0 as I described=2C=A0=A0 no WAL is replicated from B to A.=0A= =0A= Did you try this scenario yourself?=A0=A0=A0=A0 I hope you agree it is a bu= g?=0A= I will defer to you on what part of the code is the true cause=2C=0A= but to me it looks very much as though pg_rewind ought to update the contro= l file in this scenario.=0A= That certainly does fix it.=0A= If not that=2C=A0=A0 then what?=0A= =0A= Cheers=2C=A0=A0 John=0A= =0A= ----------------------------------------=0A= > Date: Mon=2C 25 Apr 2016 16:23:58 +0900=0A= > Subject: Re: [BUGS] BUG #14109: pg_rewind fails to update target control = file in one scenario=0A= > From: michael.paquier@gmail.com=0A= > To: johnlumby@hotmail.com=0A= > CC: pgsql-bugs@postgresql.org=0A= >=0A= > On Mon=2C Apr 25=2C 2016 at 4:25 AM=2C <johnlumby@hotmail.com> wrote:=0A= >> However=2C what I believe *is* needed is to update the target control fi= le=0A= >> with the new timeline and other information from the source.=0A= >=0A= > No=2C this is incorrect. There is no need to update the control file of= =0A= > a node that has not been rewound=2C and pg_rewind should not mess up=0A= > with that if there is no divergence point between the target and the=0A= > source nodes or it would update the minimum recovery point of a node=0A= > without real need to do so. It should be able to join back the cluster=0A= > depending on its initial shutdown state (when you shut down systemA).=0A= > What are the logs of your system A telling you regarding its startup=0A= > state?=0A= > --=0A= > Michael=0A= =
В списке pgsql-bugs по дате отправления: