public inbox for [email protected]
help / color / mirror / Atom feedFrom: William Ivanski <[email protected]>
To: [email protected]
Subject: Fixed port 65432 in pglogical_create_subscriber
Date: Fri, 25 Sep 2020 01:18:30 -0300
Message-ID: <CAG7+Lq__342Y7GMzhmmspPRmE=SuPRcEvPhEsMJcg9o6PjWt8A@mail.gmail.com> (raw)
Hi,
Operating system is Ubuntu 18.04, the issue is with package
postgresql-9.4-pglogical. I didn't test with > 9.4.
I've been trying to convert a PostgreSQL 9.4 physical standby into a
logical subscriber using pglogical_create_subscriber. It can't initialize
pglogical on the subscriber server because it can't connect to the local
PostgreSQL database after a restart, so it hangs.
As you can see below (sensitive information redacted), I have configured to
start local PostgreSQL database on port 5433. File
/etc/postgresql/9.4/main/postgresql.conf confirms port is set to 5433.
postgres@subserver ~ $
/usr/lib/postgresql/9.4/bin/pglogical_create_subscriber \
> -D /var/lib/postgresql/9.4/main/ -n subserver \
> --subscriber-dsn='host=127.0.0.1 port=5433 dbname=mydb user=pglogical' \
> --provider-dsn='host=192.168.0.100 port=5432 dbname=mydb user=pglogical'
\
> --hba-conf=/etc/postgresql/9.4/main/pg_hba.conf \
> --postgresql-conf=/etc/postgresql/9.4/main/postgresql.conf \
> --drop-slot-if-exists -s -v
pglogical_create_subscriber: starting ...
Getting information for database mydb ...
Creating replication slot in database mydb ...
Creating restore point "pglogical_create_subscriber_59e1d7bc" on remote
node ...
Bringing subscriber node to the restore point ...
Waiting for PostgreSQL to accept connections ....
Waiting for PostgreSQL to become primary...Waiting for PostgreSQL to accept
connections ...
Removing old pglogical configuration ...
Waiting for PostgreSQL to shutdown ...
Initializing pglogical on the subscriber node:
Waiting for PostgreSQL to accept connections ................[never ends]
pglogical_create_subscriber started the local PostgreSQL instance on port
65432, but it's expecting to connect to port 5433, so it will never be able
to connect.
I checked pglogical source code on [1] and I was not able to find any
explanation for this fixed port 65432. Then I found the pglogical source
code is being patched to start Postgres with a fixed port 65432 here [2].
[1] https://github.com/2ndQuadrant/pglogical
[2]
https://salsa.debian.org/postgresql/pglogical/-/blob/master/debian/patches/pglogical_create_subscrib...
--
William Ivanski - 2ndQuadrant
PostgreSQL Solutions for the Enterprise
view thread (5+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: Fixed port 65432 in pglogical_create_subscriber
In-Reply-To: <CAG7+Lq__342Y7GMzhmmspPRmE=SuPRcEvPhEsMJcg9o6PjWt8A@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox