<div dir="ltr">Hi, Michel!<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Maybe this post fixes your problem with 3 nodes:</span><br style="font-family:arial,sans-serif;font-size:13px"><a href="http://www.sraoss.jp/pipermail/pgpool-general/2013-November/002342.html" target="_blank" style="font-family:arial,sans-serif;font-size:13px">http://www.sraoss.jp/pipermail/pgpool-general/2013-November/002342.html</a><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 7 October 2014 19:15, Michel Kirstein <span dir="ltr">&lt;<a href="mailto:kirstein@tuhh.de" target="_blank">kirstein@tuhh.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jose,<br>
i think i&#39;m having the same problem.<br>
<a href="http://www.pgpool.net/pipermail/pgpool-general/2014-September/003172.html" target="_blank">http://www.pgpool.net/<u></u>pipermail/pgpool-general/2014-<u></u>September/003172.html</a><br>
<br>
I haven&#39;t found a valid solution for this yet, but seemingly stable workaround.<br>
Here is what i found so far:<br>
<br>
After Postgresql starts, you can find out with &quot;pg_controldata [option] [datadir]&quot; what the &quot;Latest checkpoint&#39;s NextOID&quot; should be. If you now create a new Database and ask for it&#39;s OID it should be the same.<br>
After some (i guess) traffic, Postgresql pre-allocates an additional full WAL block. You can see that there are significant more files in the xlog folder than at start postgresql. If you now check &quot;Latest checkpoint&#39;s NextOID&quot; you will find, that it has now advanced by roughly a full block.<br>
If you were to make a backup of this now (read &quot;online-recovery&quot;) that backup will start with this NextOID value while the original still runs with the first OID.<br>
I guess this behavior is to protect a recovered database against OID collision.<br>
I found, that if you shut down Postgresql, it will clear out it&#39;s internal memory and save everything to disk. If you check &quot;Latest checkpoint&#39;s NextOID&quot; now, you will find that it has reverted back to the first value. My workaround consists of simply blocking all connections to pgpool, restart all nodes and then recover the target node.<br>
<br>
I still have to find a function that has the same effect as a full stop. I had hoped one of those create checkpoint functions does so, but to no avail for now.<br>
<br>
If you happen to find a way to fix this please share it...<br>
<br>
<br>
<br>
Am 07.10.2014 um 19:27 schrieb Jose Baez:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Hello!<br>
<br>
I&#39;ve got 2 virtual machine (Xen Server 6.2) with Debian Wheezy and:<br>
<br></span>
  * PostgreSQL 9.1<br>
  * Pgpool 3.1.12<br>
  * Pacemaker/Corosync with pgpool-HA 2.2<span class=""><br>
<br>
I tweaked the recovery scripts to do &quot;online recovery&quot;. It went smooth<br>
both ways.<br>
<br>
However, when I &quot;CREATE DATABASE&quot; and connect through PgAdmin, Pgpool says:<br>
<br></span>
ERROR: pid 7628: read_kind_from_backend: *1 th kind C does not match<br>
with master or majority connection kind D*<span class=""><br>
ERROR: pid 7628: kind mismatch among backends. Possible last query was:<br>
&quot;SET DateStyle=ISO; SET client_min_messages=notice; SET<br>
bytea_output=escape; SELECT oid, pg_encoding_to_char(encoding) AS<br>
encoding, datlastsysoid<br></span>
   FROM pg_database WHERE *oid = 18540&quot; kind details are: 0[D] 1[C]*<span class=""><br>
<br>
I checked database OID on each node and they are different (oid 18549<br>
and the oher is 26670). Is it normal?<br>
I created a few tables and they have indeed different OID in both<br>
nodes......<br>
<br>
If it is normal to have different OID in both nodes, why pgpool would<br>
complain?<br>
If it should not happen, why would both nodes create an object with<br>
different OID? I checked in both nodes that all Pgpool extensions are<br>
installed (regclass, insert_lock, recovery, remote_start, switch_xlog)<br>
<br>
What field/file defines the next OID to use?<br>
At first, I thought the problem was the multiple statement limitation<br>
(sent by PgAdmin) but it is not, because when I do &quot;online recovery&quot;<br>
both nodes get same OID in every object and I can connect with PgAdmin<br>
smoothly.<br>
<br>
(I found few links about same problem and nobody answered:<br>
<a href="http://lists.pgfoundry.org/pipermail/pgpool-general/2009-October/002229.html" target="_blank">http://lists.pgfoundry.org/<u></u>pipermail/pgpool-general/2009-<u></u>October/002229.html</a><br>
<a href="http://lists.pgfoundry.org/pipermail/pgpool-general/2008-June/001071.html" target="_blank">http://lists.pgfoundry.org/<u></u>pipermail/pgpool-general/2008-<u></u>June/001071.html</a><br>
<br>
I used PgAdmin from 1.16 to 1.20 with same behaviour.<br>
<br>
<br>
Thank you for your time!<br>
<br>
<br></span>
_pgpool.conf:_<span class=""><br>
<br>
backend_hostname0 = &#39;psql1&#39;<br>
backend_port0 = 5433<br>
backend_weight0 = 1<br>
backend_data_directory0 = &#39;/var/lib/postgresql/9.1/main&#39;<br>
backend_flag0 = &#39;ALLOW_TO_FAILOVER&#39;<br>
<br>
backend_hostname1 = &#39;psql2&#39;<br>
backend_port1 = 5433<br>
backend_weight1 = 1<br>
backend_data_directory1 = &#39;/var/lib/postgresql/9.1/main&#39;<br>
backend_flag1 = &#39;ALLOW_TO_FAILOVER&#39;<br>
<br>
connection_cache = on<br>
<br>
replication_mode = on<br>
    replicate_select = off<br>
    insert_lock = on<br>
    lobj_lock_table = &#39;&#39;<br>
<br>
load_balance_mode = off<br>
master_slave_mode = off<br>
parallel_mode = off<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br></span>
______________________________<u></u>_________________<br>
pgpool-general mailing list<br>
<a href="mailto:pgpool-general@pgpool.net" target="_blank">pgpool-general@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" target="_blank">http://www.pgpool.net/mailman/<u></u>listinfo/pgpool-general</a><br>
<br>
</blockquote>
______________________________<u></u>_________________<br>
pgpool-general mailing list<br>
<a href="mailto:pgpool-general@pgpool.net" target="_blank">pgpool-general@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" target="_blank">http://www.pgpool.net/mailman/<u></u>listinfo/pgpool-general</a><br>
</blockquote></div><br></div>