Re: pgpool-general@lists.postgresql.org

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: Zdenek(dot)Koktan(at)cdt(dot)cz
Cc: pgpool-general(at)lists(dot)postgresql(dot)org
Subject: Re: pgpool-general@lists.postgresql.org
Date: 2026-03-05 04:32:14
Message-ID: 20260305.133214.526232552934046503.ishii@postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgpool-general

Hi,

From: Zdenek(dot)Koktan(at)cdt(dot)cz
Subject: pgpool-general(at)lists(dot)postgresql(dot)org
Date: Tue, 3 Mar 2026 11:02:03 +0100
Message-ID: <OFD7B76D63(dot)D5F7C882-ONC1258DAF(dot)00367DA1-C1258DAF(dot)00371EE0(at)cdt(dot)cz>

> Hello,
> i have a problem with error which occurs on my pgpool cluster. The log
> messages i collected for this error :
>
> 2026-03-02 15:30:21.767: PostgreSQL JDBC Driver pid 197272: ERROR: unable
> to write data to frontend
> 2026-03-02 15:30:21.767: PostgreSQL JDBC Driver pid 197272: DETAIL:
> pool_flush failed
> 2026-03-02 15:30:21.767: PostgreSQL JDBC Driver pid 197272: LOCATION:
> pool_stream.c:539
> 2026-03-02 15:30:21.767: PostgreSQL JDBC Driver pid 197272: LOG: frontend
> disconnection: session time: 0:00:32.989 user=network_app_prod_adm
> database=network_app_prod host=cdis000phaux173.cdis.cz port=63675
> 2026-03-02 15:30:21.767: PostgreSQL JDBC Driver pid 197272: LOCATION:
> child.c:2110
> 2026-03-02 15:30:21.767: PostgreSQL JDBC Driver pid 197272: LOG: DB node
> id: 0 backend pid: 3935771 statement: DISCARD ALL
> 2026-03-02 15:30:21.767: PostgreSQL JDBC Driver pid 197272: LOCATION:
> pool_proto_modules.c:3802
> 2026-03-02 15:30:21.767: PostgreSQL JDBC Driver pid 197272: LOG: DB node
> id: 2 backend pid: 199834 statement: DISCARD ALL
> 2026-03-02 15:30:21.767: PostgreSQL JDBC Driver pid 197272: LOCATION:
> pool_proto_modules.c:3802
> 2026-03-02 15:30:21.768: PostgreSQL JDBC Driver pid 197272: WARNING:
> packet kind of backend 2 ['Z'] does not match with main/majority nodes
> packet kind ['D']
> 2026-03-02 15:30:21.768: PostgreSQL JDBC Driver pid 197272: LOCATION:
> pool_process_query.c:3713
> 2026-03-02 15:30:21.768: PostgreSQL JDBC Driver pid 197272: FATAL: failed
> to read kind from backend
> 2026-03-02 15:30:21.768: PostgreSQL JDBC Driver pid 197272: DETAIL: kind
> mismatch among backends. Possible last query was: "DISCARD ALL" kind
> details are: 0[D] 2[Z]
> 2026-03-02 15:30:21.768: PostgreSQL JDBC Driver pid 197272: HINT: check
> data consistency among db nodes
> 2026-03-02 15:30:21.768: PostgreSQL JDBC Driver pid 197272: LOCATION:
> pool_process_query.c:3810
>
> The customer complaints that the statement he is trying to send to
> database (INSERT) is basicaly not entered into the database. This error
> happenes several times a day,
> My version of pgpool and database :
>
> postgres(at)postgre-cdis-clu-pha-db3:/var/lib/pgsql/data/log> pgpool -version
> pgpool-II version 4.5.10 (hotooriboshi)
>
> postgres(at)postgre-cdis-clu-pha-db3:/var/lib/pgsql/data/log> psql -version
> psql (16.11)
> Type "help" for help.
>
> The configuration of cluster:
>
> postgres(at)postgre-cdis-clu-pha-db3:/var/lib/pgsql/data/log>
> pcp_watchdog_info -h 10.31.8.28 -p 9898 -U pgpool
> 3 3 YES postgre-cdis-clu-pha-db3:9999 Linux postgre-cdis-clu-pha-db3
> postgre-cdis-clu-pha-db3
>
> postgre-cdis-clu-pha-db3:9999 Linux postgre-cdis-clu-pha-db3
> postgre-cdis-clu-pha-db3 9999 9000 4 LEADER 0 MEMBER
> postgre-cdis-clu-pha-db1:9999 Linux postgre-cdis-clu-pha-db1
> postgre-cdis-clu-pha-db1 9999 9000 7 STANDBY 0 MEMBER
> postgre-cdis-clu-pha-db2:9999 Linux postgre-cdis-clu-pha-db2
> postgre-cdis-clu-pha-db2 9999 9000 7 STANDBY 0 MEMBER
>
> postgres(at)postgre-cdis-clu-pha-db3:/var/lib/pgsql/data/log> psql -h
> 10.31.8.28 -p 9999 -U pgpool postgres -c "show pool_nodes"
> node_id | hostname | port | status | pg_status |
> lb_weight | role | pg_role | select_cnt | load_balance_node |
> replication_delay | replication_state | replicati
> on_sync_state | last_status_change
> ---------+--------------------------+------+--------+-----------+-----------+---------+---------+------------+-------------------+-------------------+-------------------+----------
> --------------+---------------------
> 0 | postgre-cdis-clu-pha-db1 | 5432 | up | up | 0.333333
> | standby | standby | 14069796 | false | 0 | streaming |
> async
> | 2026-03-02 15:28:50
> 1 | postgre-cdis-clu-pha-db2 | 5432 | up | up | 0.333333
> | standby | standby | 13284878 | true | 0 | streaming |
> async
> | 2026-03-02 15:28:50
> 2 | postgre-cdis-clu-pha-db3 | 5432 | up | up | 0.333333
> | primary | primary | 15253310 | false | 0 | |
> | 2026-03-02 15:28:50
> (3 rows)
>
> There are no errors at database level in the database log.
> Any advice how to solve this ?

It seems your java disconnects to pgpool. I suggest to inspect the
application log and check why the application disconnected,

> 2026-03-02 15:30:21.767: PostgreSQL JDBC Driver pid 197272: ERROR: unable
> to write data to frontend
> 2026-03-02 15:30:21.767: PostgreSQL JDBC Driver pid 197272: DETAIL:
> pool_flush failed
> 2026-03-02 15:30:21.767: PostgreSQL JDBC Driver pid 197272: LOCATION:
> pool_stream.c:539
> 2026-03-02 15:30:21.767: PostgreSQL JDBC Driver pid 197272: LOG: frontend
> disconnection: session time: 0:00:32.989 user=network_app_prod_adm
> database=network_app_prod host=cdis000phaux173.cdis.cz port=63675
> 2026-03-02 15:30:21.767: PostgreSQL JDBC Driver pid 197272: LOCATION:
> child.c:2110

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

In response to

Browse pgpool-general by date

  From Date Subject
Next Message zam bak 2026-03-05 18:25:58 Fwd: RPM packages for "aarch64" platform
Previous Message Zdenek.Koktan 2026-03-03 10:02:03 pgpool-general@lists.postgresql.org