<div dir="ltr">Hi,<div><br></div><div>What do you get on your pgpool log and databaservers logs ?  What is the output of show pool_nodes when you connect to pgpool ?</div><div><br></div><div>Thanks</div></div><br><div class="gmail_quote"><div dir="ltr">El mar., 4 dic. 2018 a las 9:02, Christian Schwaderer (&lt;<a href="mailto:schwaderer@ivocotec.de">schwaderer@ivocotec.de</a>&gt;) escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks!<br>
<br>
I&#39;ve tried that. However, pgpool keeps writing my node0 as &quot;down&quot; to its <br>
log file - no matter what I do. However, node0  is up! I can access it <br>
from withing psql and also from my app with node-postgres driver.<br>
<br>
What can I do to find out why pgpool doesn&#39;t find my node0?<br>
<br>
On 01.12.18 03:50, Bo Peng wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; I think Pgpool-II considers the primary node0 is down,<br>
&gt; even if node0 is up.<br>
&gt;<br>
&gt; Please remove pgpool_status file which you specified in &quot;logdir&quot; paramater<br>
&gt; and restart Pgpool-II.<br>
&gt;<br>
&gt;<br>
&gt; On Fri, 30 Nov 2018 10:58:06 +0100<br>
&gt; Christian Schwaderer &lt;<a href="mailto:schwaderer@ivocotec.de" target="_blank">schwaderer@ivocotec.de</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Dear all,<br>
&gt;&gt;<br>
&gt;&gt; On two Ubuntu 18.04 Virtual Machines, I&#39;ve setup PostgreSQL 11 on each,<br>
&gt;&gt; one being master, the other one hot-standy. The replication works as I<br>
&gt;&gt; expect.<br>
&gt;&gt;<br>
&gt;&gt; Now I want to add a pgpool-layer for failover. I&#39;ve installed pgpool<br>
&gt;&gt; 4.0.2 on the first VM and configured it with these settings:<br>
&gt;&gt;<br>
&gt;&gt; |port =5437backend_hostname0 =&#39;192.168.56.177&#39;backend_port0<br>
&gt;&gt; =5432backend_weight0 =1backend_data_directory0<br>
&gt;&gt; =&#39;/var/lib/pgsql/data&#39;backend_flag0<br>
&gt;&gt; =&#39;ALLOW_TO_FAILOVER&#39;backend_hostname1 =&#39;192.168.56.178&#39;backend_port1<br>
&gt;&gt; =5432backend_weight1 =1backend_data_directory1<br>
&gt;&gt; =&#39;/var/lib/pgsql/data&#39;backend_flag1<br>
&gt;&gt; =&#39;ALLOW_TO_FAILOVER&#39;master_slave_mode =onmaster_slave_sub_mode =&#39;stream&#39;|<br>
&gt;&gt;<br>
&gt;&gt; (Hoping these are the most important things. I think I didn&#39;t change the<br>
&gt;&gt; rest.)<br>
&gt;&gt;<br>
&gt;&gt; Now if I connect with a Postgres-client (I&#39;ve tested psql and<br>
&gt;&gt; node-postgres) to <a href="http://192.168.56.177:5437" rel="noreferrer" target="_blank">192.168.56.177:5437</a>, I can do |SELECT| statements, but<br>
&gt;&gt; no |UPDATE|/|INSERT|. I&#39;ll always get |cannot execute UPDATE/INSERT in a<br>
&gt;&gt; read-only transaction|.<br>
&gt;&gt;<br>
&gt;&gt; Is this somehow connected to misconfigured load-balancing? I&#39;m quite new<br>
&gt;&gt; to this, but as far as I understand, pgpool can be configured to<br>
&gt;&gt; distribute read statements among slaves, while all write statements<br>
&gt;&gt; should go to the master. However, this is not what I want to have. So,<br>
&gt;&gt; what I&#39;m a doing wrong?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Best,<br>
&gt;&gt;<br>
&gt;&gt; Christian<br>
&gt;&gt;<br>
&gt;<br>
-- <br>
Christian Schwaderer, Software-Entwickler/software developer<br>
------------------------------------------------------------<br>
ivocoTec GmbH<br>
Entwicklungsabteilung/IT department<br>
<br>
Postplatz 3<br>
D-16761 Hennigsdorf<br>
<br>
<a href="https://ivocotec.de" rel="noreferrer" target="_blank">https://ivocotec.de</a><br>
Telefon/phone +49 (0)3302 20 63 230<br>
<br>
<br>
_______________________________________________<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" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
</blockquote></div>