[pgpool-general: 6741] Re: pgpool failover issue

Tatsuo Ishii ishii at sraoss.co.jp
Sun Oct 20 13:37:23 JST 2019


> Hi,
> I was using pgpool4.0.6 + postgres10.5 to implement database HA. And it is accessed frequently by my Java Application (let’s call it appJ).
> Here is my problem:
> I assumed pgpool shall detect the database error, promote standby so that the user/application could not even sense the error. When I shutdown the primary, the standby is promoted immediately. New connections can be established. Everything seems work fine. But appJ log shows that SQLException occurred. SQLs supposed to be done are discarded.

Basically SQL level errors (e.g. syntax errors, failed to insert data
due to duplicate primary key errors) do not trigger fail over in
Pgpool-II. What kind of error did you get?

> I tried both master-slave mode (master_slave_mode = on, master_slave_sub_mode = stream, relication_mode = off) and
> replication mode (maste_slave_mode = off, replication_mode = on). The problem is not solved.
> Is there any way to solve it (with out improve appJ code)?
> By the way, I find pgpool running modes quite confusing.
> https://www.pgpool.net/docs/latest/en/html/configuring-pgpool.html
> https://www.pgpool.net/docs/latest/en/html/runtime-config-running-mode.html
> especially stream replication mode, replication mode, master-slave mode. What are connections and differences?

Replication mode does not rely on PostgreSQL's replication facility
 i.e. streaming replication or logical replication.

On the other hand master slave mode relies on PostgreSQL's replication
facility or Slony.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-general mailing list