No subject

Fri Jan 30 20:15:43 JST 2015

=C2=A0 =C2=A0 =C2=A0 =C2=A0 /*<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* If no one woke up, we regard the status=
 file bogus<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*/<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (someone_wakeup =3D=3D false)<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 {<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 for (i=3D0;i&lt; po=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 BACKEND_INFO(i).backend_status =3D CON_CONNECT_WAIT;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (void)write_status_=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }<br>
Here is the commit log:<br>
commit a97eed16ef8c3a481c0cd0282b9950fb4ee28a89<br>
Author: Tatsuo Ishii &lt;ishii at <a href=3D"" rel=3D"no=
referrer" target=3D"_blank"></a>&gt;<br>
Date:=C2=A0 =C2=A0Sat Feb 13 11:23:55 2010 +0000<br>
=C2=A0 =C2=A0 Fix read_status_file so that if all nodes were marked down st=
=C2=A0 =C2=A0 it is regarded that this file is bogus. This will prevent &qu=
=C2=A0 =C2=A0 node down&quot; syndrome.<br>
The decision was made long time ago by me, but now I think this was<br>
not correct decision as you pointed out. I think we need to remove<br>
this part except in &quot;raw mode&quot;, in which database incosistency pr=
will not happen.<br>
Best regards,<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href=3D"" rel=3D"noreferrer=
" target=3D"_blank"></a><br>
Japanese:<a href=3D"" rel=3D"noreferrer" target=3D"_=
&gt; Thank you.=C2=A0 I&#39;ve confirmed that if only *one* of the two serv=
ers is<br>
&gt; unreachable, pgpool behaves as expected (waits for the server to be<br=
&gt; manually reattached).<br>
&gt; Although I wonder also, even if pgpool *did* correctly refuse to send<=
&gt; traffic if both servers were &quot;down&quot; in pgpool_status on rest=
art, how<br>
&gt; should we know in which direction to recover data (from A to B or B to=
&gt; A)?=C2=A0 Pgpool does not record in pgpool_status which &quot;down&quo=
t; server was<br>
&gt; the last to go down (and is thus authoritative).=C2=A0 As a workaround=
&gt; think it would work to write a failover/failback_command which records=
&gt; this information.<br>
&gt; On Wed, Aug 5, 2015 at 6:59 PM, Tatsuo Ishii &lt;<a href=3D"mailto:ish=
ii at">ishii at</a>&gt; wrote:<br>
&gt;&gt; Pgpool should recognize that both A and B are in down status, but<=
&gt;&gt; actually not. Let me investigate...<br>
&gt;&gt; Best regards,<br>
&gt;&gt; --<br>
&gt;&gt; Tatsuo Ishii<br>
&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; English: <a href=3D"" rel=3D"n=
oreferrer" target=3D"_blank"></a><br>
&gt;&gt; Japanese:<a href=3D"" rel=3D"noreferrer" ta=
&gt;&gt;&gt; Consider the following sequence, starting from a healthy syste=
m of two<br>
&gt;&gt;&gt; PG servers (A and B) joined in &quot;replication&quot; mode:<b=
&gt;&gt;&gt; 1) Server A loses connectivity.<br>
&gt;&gt;&gt; 2) A write comes in, which pgpool commits to server B.<br>
&gt;&gt;&gt; 3) Server B loses connectivity.<br>
&gt;&gt;&gt; 4) Server A regains connectivity.<br>
&gt;&gt;&gt; 5) pgpool restarts (due to either sysadmin action or failure).=
&gt;&gt;&gt; At this point, pgpool happily directs all traffic to server A,=
&gt;&gt;&gt; does *not* have the most recent commit to server B.=C2=A0 This=
 is very bad<br>
&gt;&gt;&gt; since I have now lost data consistency.<br>
&gt;&gt;&gt; Rather, I would expect that pgpool remembers that it has writt=
en data<br>
&gt;&gt;&gt; to B but not to A, and would refuse incoming connections until=
 A has<br>
&gt;&gt;&gt; been recovered from B.<br>
&gt;&gt;&gt; Even to workaround, if before restarting pgpool, I had some to=
ol which<br>
&gt;&gt;&gt; checked the state in which pgpool left the two servers and the=
&gt;&gt;&gt; rectified them, that would suffice.=C2=A0 However since pgpool=
 doesn&#39;t seem<br>
&gt;&gt;&gt; to track at all the fact that it had written some data only to=
 B but<br>
&gt;&gt;&gt; not to A, that information is not available (e.g. from pgpool_=
&gt;&gt;&gt; What am I missing?=C2=A0 How is it that others use pgpool in &=
&gt;&gt;&gt; mode without encountering data inconsistencies when nodes fail=
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; pgpool-general mailing list<br>
&gt;&gt;&gt; <a href=3D"mailto:pgpool-general at">pgpool-general at pg=</a><br>
&gt;&gt;&gt; <a href=3D"
al" rel=3D"noreferrer" target=3D"_blank">
pgpool-general mailing list<br>
<a href=3D"mailto:pgpool-general at">pgpool-general at</a><=
<a href=3D"" rel=3D"no=
referrer" target=3D"_blank">


More information about the pgpool-general mailing list