[pgpool-general: 9354] Re: pgpool 4.5.5 can't reach stand by server
Mauricio Fernandez
mmauricio.fernandez at gmail.com
Wed Feb 12 23:43:58 JST 2025
By the way, se pg_hba.conf for the primary server has this lines
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
#local all all trust
*local all all
scram-sha-256*
# IPv4 local connections:
#host all all 127.0.0.1/32
scram-sha-256
#host all all 192.168.0.0/24
scram-sha-256
*host all all 0.0.0.0/0 <http://0.0.0.0/0>
scram-sha-256*
# Allow replication connections from localhost, by a user with the
# replication privilege.
host replication replicador 192.168.1.0/24 scram-sha-256
thaks
kind regards
Mauricio
El mar, 11 feb 2025 a las 9:20, Tatsuo Ishii (<ishii at postgresql.org>)
escribió:
> > From the master node (192.168.0.160) I can connect to the server1, the
> > stand by server
> >
> > [postgres at buda pgpool-II]$ psql -h 192.168.0.162 -U postgres -p 5434
> > Contraseña para usuario postgres:
> > psql (17.2)
> > Digite «help» para obtener ayuda.
> > postgres=# \q
> >
> > [postgres at buda pgpool-II]$ pcp_attach_node -p 9898 -h 192.168.0.162 -n
> 1 -U
> > postgres
> > ERROR: connection to host "192.168.0.162" failed with error "No route to
> > host"
> >
> > In pgpool.con, the pcp parameters are:
> >
> > pcp_listen_addresses = '*'
> > #pcp_port = 9898
> > pcp_socket_dir = '/var/run/postgresql'
> > #log_pcp_processes = on
>
> The pcp_attach_node command needs to connect to pgpool, not standby
> PostgreSQL server. So you should run the command on 192.168.0.160 with
> command line: pcp_attach_node -p 9898 -h localhost 1
>
> > Even if the attaching process would work, I don't understand why it is
> > necessary and pgpool don't try to reach stand by server at the starting
> up
> > time.
>
> Because pgpool remembers that node 1 (standby) was down. You need to
> teach pgpool that now node 1 comes up. This is intentional to not
> automatically attach broken server.
>
> > By de the way, for me was not easy install pgpool. The process failed
> > because inexistent library libmemcached.so.11. After a while I could
> reach
> > the correct rpm from
> >
> https://oraclelinux.pkgs.org/9/ol9-codeready-builder-x86_64/libmemcached-awesome-1.1.0-12.el9.x86_64.rpm.html
> >
> > dnf install ./libmemcached-awesome-1.1.0-12.el9.x86_64.rpm
> >
> > After installing the library and editing
> > /etc/yum.repos.d/pgdg-redhat-all.repo adding exclude=pgpool* in each
> > postgresql section
> > I could install pgpool.
>
> Maybe you are using RPM which is not Pgpool-II community RPM?
>
> https://www.pgpool.net/yum/
>
> BTW you seem to set backend_hostname0 = 'localhost', which is not
> recommended. You'd better to set backend_hostname0 = '192.169.0.160'
> instead.
>
> Best reagards,
> --
> Tatsuo Ishii
> SRA OSS K.K.
> English: http://www.sraoss.co.jp/index_en/
> Japanese:http://www.sraoss.co.jp
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20250212/32e45a72/attachment.htm>
More information about the pgpool-general
mailing list