[pgpool-general: 6633] Re: failover configuration problem
Tatsuo Ishii
ishii at sraoss.co.jp
Wed Jul 10 07:26:30 JST 2019
Sorry, I was not clear. I meant:
1. connect to Pgpool-II using psql
2. enter "pgpool show backend"
> It doesnt recognize that command. It just prints the help output.
>
> pgpool-II version 4.0.5 (torokiboshi),
> A generic connection pool/replication/load balance server for PostgreSQL
>
> Usage:
> pgpool [ -c] [ -f CONFIG_FILE ] [ -F PCP_CONFIG_FILE ] [ -a
> HBA_CONFIG_FILE ]
> [ -n ] [ -D ] [ -d ]
> pgpool [ -f CONFIG_FILE ] [ -F PCP_CONFIG_FILE ] [ -a HBA_CONFIG_FILE ]
> [ -m SHUTDOWN-MODE ] stop
> pgpool [ -f CONFIG_FILE ] [ -F PCP_CONFIG_FILE ] [ -a HBA_CONFIG_FILE ]
> reload
>
> Common options:
> -a, --hba-file=HBA_CONFIG_FILE
> Set the path to the pool_hba.conf configuration file
> (default: /etc/pgpool-II/pool_hba.conf)
> -f, --config-file=CONFIG_FILE
> Set the path to the pgpool.conf configuration file
> (default: /etc/pgpool-II/pgpool.conf)
> -k, --key-file=KEY_FILE
> Set the path to the pgpool key file
> (default: /root/.pgpoolkey)
> can be over ridden by PGPOOLKEYFILE environment
> variable
> -F, --pcp-file=PCP_CONFIG_FILE
> Set the path to the pcp.conf configuration file
> (default: /etc/pgpool-II/pcp.conf)
> -h, --help Print this help
>
> Start options:
> -C, --clear-oidmaps Clear query cache oidmaps when memqcache_method is
> memcached
> (If shmem, discards whenever pgpool starts.)
> -n, --dont-detach Don't run in daemon mode, does not detach control tty
> -x, --debug-assertions Turns on various assertion checks, This is a
> debugging aid
> -D, --discard-status Discard pgpool_status file and do not restore
> previous status
> -d, --debug Debug mode
>
> Stop options:
> -m, --mode=SHUTDOWN-MODE
> Can be "smart", "fast", or "immediate"
>
> Shutdown modes are:
> smart quit after all clients have disconnected
> fast quit directly, with proper shutdown
> immediate the same mode as fast
>
> On Tue, Jul 9, 2019 at 9:18 AM Tatsuo Ishii <ishii at sraoss.co.jp> wrote:
>
>> > I have a fairly (I thought) straightforward pgpool setup, the backend is
>> > postrgresql database that is streaming to a hot standby. I am testing the
>> > failover, but when I shutdown the primary database instance and open the
>> > standby database instance for read/write, i get this message. "health
>> check
>> > failed on node 0 but failover is disallowed for the node". What setting
>> am
>> > I missing here?
>> >
>> >
>> > Applicable section from the log:
>> >
>> > Jul 5 10:45:14 pgpool1 pgpool-II-10[32640]: [13-1] 2019-07-05 10:45:14:
>> pid
>> > 32640: ERROR: failed to make persistent db connection Jul 5 10:45:14
>> > pgpool1 pgpool-II-10[32640]: [13-2] 2019-07-05 10:45:14: pid 32640:
>> DETAIL:
>> > connection to host:"10.12.1.225:5432" failed Jul 5 10:45:14 pgpool1
>> > pgpool-II-10[32640]: [14-1] 2019-07-05 10:45:14: pid 32640: LOG: health
>> > check failed on node 0 but failover is disallowed for the node
>>
>> Strange.
>>
>> > Here are the applicable sections from my pgpool.conf
>> > - Backend Connection Settings -
>> >
>> > backend_hostname0 = '10.12.1.225'
>> > backend_port0 = 5432
>> > backend_weight0 = 1
>> > backend_data_directory0 = '/postgres/data/pgdata'
>> > backend_flag0 = 'ALLOW_TO_FAILOVER'
>> >
>> > backend_hostname1 = '10.12.1.61'
>> > backend_port1 = 5432
>> > backend_weight1 = 1
>> > backend_data_directory1 = '/postgres/data/pgdata'
>> > backend_flag1 = 'ALLOW_TO_FAILOVER'
>> >
>> > master_slave_mode = on
>> > master_slave_sub_mode = 'stream'
>> > health_check_period = 10
>> > health_check_timeout = 5
>> > health_check_user = 'nobody'
>> > health_check_password = ''
>> > health_check_max_retries = 0
>> > health_check_retry_delay = 1
>> > connect_timeout = 10000
>> > failover_command = ''
>> > failback_command = ''
>>
>> I would like to confirm whether Pgpool-II properly recognizes those
>> settings, especially backend_flag. Can you share the output of "pgpool
>> show backend"?
>>
>> Best regards,
>> --
>> Tatsuo Ishii
>> SRA OSS, Inc. Japan
>> English: http://www.sraoss.co.jp/index_en.php
>> Japanese:http://www.sraoss.co.jp
>>
>
>
> --
> Andrew W. Kerber
>
> 'If at first you dont succeed, dont take up skydiving.'
More information about the pgpool-general
mailing list