[pgpool-general: 8579] Re: PgPool thinks node 0 is in recovery.

Tatsuo Ishii ishii at sraoss.co.jp
Wed Feb 1 08:31:56 JST 2023


> Right.  PgPool *thinks* that backend 0 is down, but it's actually up
> and running.
> 
> Where do I look to see why Pgpool thinks backend 0 is down even though
> backend 0 is actually up?

>> Hmm.  I assumed the default is 5432.
>
> Backend_port's default is 0, not 5432. I suspect the actual
> pgpool.conf used is different from what you attached in the previous
> mail.

Since you do not respond to my question, I don't know exactly what happens.

But I guess:

- pgpool_status file marks backend0 is down. So pgpool believes
  backend0 is down too unless pgpool is started with -D option.

> On 1/26/23 20:57, Tatsuo Ishii wrote:
>>> 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
> 
> -- 
> Born in Arizona, moved to Babylonia.



More information about the pgpool-general mailing list