<div dir="rtl"><div dir="ltr">Is the link you specified in the end of your comment is the 3.7.2 version without the bug ?</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">2018-03-02 1:10 GMT+02:00 Tatsuo Ishii <span dir="ltr"><<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>></span>:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So you are surely bitten by the bug in 3.7.2.<br>
<br>
In other message you failed to incomporate the patch. Maybe executing<br>
"make clean" before compiling helps you.<br>
<br>
If you are not familiar with patching, you could obtain whole source<br>
code from:<br>
<a href="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=shortlog;h=refs/heads/V3_7_STABLE" rel="noreferrer" target="_blank">https://git.postgresql.org/<wbr>gitweb/?p=pgpool2.git;a=<wbr>shortlog;h=refs/heads/V3_7_<wbr>STABLE</a><br>
<br>
In this window the top most row is the latest entry for 3.7.x. You hit<br>
"snapshot" link to get the source code tar ball (.tgz).<br>
<br>
Current direct link to the tar ball is:<br>
<a href="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=snapshot;h=8593af680d9c575c23a823489ecfa693749811f3;sf=tgz" rel="noreferrer" target="_blank">https://git.postgresql.org/<wbr>gitweb/?p=pgpool2.git;a=<wbr>snapshot;h=<wbr>8593af680d9c575c23a823489ecfa6<wbr>93749811f3;sf=tgz</a><br>
<br>
Another workaround is, swapping the entry for node 0 and node 1 in<br>
your pgpool.conf.<br>
<div class="HOEnZb"><div class="h5"><br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_<wbr>en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
<br>
> pool_version<br>
><br>
> ----------------------<br>
><br>
> 3.7.2 (amefuriboshi)<br>
><br>
> (1 row)<br>
><br>
><br>
><br>
><br>
><br>
> psql -d postgres -U postgres -h 127.0.0.1 -p 9999 -c "show pool_nodes";<br>
><br>
><br>
><br>
> node_id | hostname | port | status | lb_weight | role |<br>
> select_cnt | load_balance_node | replication_delay<br>
><br>
> ---------+-----------------+--<wbr>----+--------+-----------+----<wbr>-----+------------+-----------<wbr>--------+-------------------<br>
><br>
> 0 | pg1 | 5432 | up | 0.333333 | standby | 22565 |<br>
> true | 0<br>
><br>
> 1 | pg2 | 5432 | up | 0.333333 | primary | 10416 |<br>
> false | 0<br>
><br>
> 2 | pg3 | 5432 | up | 0.333333 | standby | 7686 |<br>
> false | 0<br>
><br>
> (3 rows)<br>
><br>
><br>
> 2018-03-01 6:23 GMT+02:00 Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>>:<br>
><br>
>> > I found a problem that had a big impact on our servers. I'm using pgpool<br>
>> as<br>
>> > a load balancer and pool connections manager. When a user tries to run a<br>
>> > select query it redirects the query to the slave. If the user tries after<br>
>> > that to run dml or ddl command he get error :<br>
>> ><br>
>> > ERROR: cannot execute CREATE TABLE in a read-only transaction<br>
>> > SQL state: 25006<br>
>> ><br>
>> > Is there any way to solve this issue ? It means that once the pool<br>
>> > redirected your session to the slaves you cant run any ddl/dml actions ..<br>
>><br>
>> Normaly Pgpool-II redirects any ddl/dml query to primary. Can you<br>
>> show me following query results? I would like to confirm your problem.<br>
>><br>
>> show pool_version;<br>
>> show pool_nodes;<br>
>><br>
>> Best regards,<br>
>> --<br>
>> Tatsuo Ishii<br>
>> SRA OSS, Inc. Japan<br>
>> English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_<wbr>en.php</a><br>
>> Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
>><br>
</div></div></blockquote></div><br></div>