[pgpool-general: 8575] Re: PgPool thinks node 0 is in recovery.
Tatsuo Ishii
ishii at sraoss.co.jp
Fri Jan 27 11:57:36 JST 2023
> psql on FISPCCPGS405a port 5432 says that pg_is_in_recovery() = 'f'
> (that is correct), while psql on FISPCCPGS405a port 9999 says that
> pg_is_in_recovery() = 't'.
>
> That is incorrect, and certainly why "psql --host=localhost
> --port=9999" drops me into a read only transaction.
Because backend 0 is in down status, Pgpool-II thinks backend 0 is out
of use and sends all queries to backend 1.
So you need to solve the problem, i.e. backend0 is in down status
problem first.
> What should I look for (logging is debug3") to resolve this?
>
> $ hostname
> FISPCCPGS405a
>
>
> $ grep FISPCCPGS405[ab] pgpool.conf
> backend_hostname0 = 'FISPCCPGS405a'
> backend_hostname1 = 'FISPCCPGS405b'
> hostname0 = 'FISPCCPGS405a'
> hostname1 = 'FISPCCPGS405a'
>
>
> $ psql --host=localhost --username=postgres --port=9999 -c "\x" -c
> "show pool_nodes;"
> Expanded display is on.
> -[ RECORD 1 ]----------+--------------------
> node_id | 0
> hostname | FISPCCPGS405a
> port | 5432
> status | down <<<<<<<<<<<<<<
> pg_status | up <<<<<<<<<<<<<<
> lb_weight | 0.666667
> role | primary
> pg_role | primary
> select_cnt | 0
> load_balance_node | false
> replication_delay | 0
> replication_state |
> replication_sync_state |
> last_status_change | 2023-01-26 13:31:04
> -[ RECORD 2 ]----------+--------------------
> node_id | 1
> hostname | FISPCCPGS405b
> port | 5432
> status | up <<<<<<<<<<<<<<<
> pg_status | up <<<<<<<<<<<<<<<
> lb_weight | 0.333333
> role | standby
> pg_role | standby
> select_cnt | 0
> load_balance_node | true
> replication_delay | 0
> replication_state |
> replication_sync_state |
> last_status_change | 2023-01-26 13:31:04
>
>
>
> --
> Born in Arizona, moved to Babylonia.
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general
More information about the pgpool-general
mailing list