Re: Fixed port 65432 in pglogical_create_subscriber - Mailing list pgsql-pkg-debian

From Michael Banck
Subject Re: Fixed port 65432 in pglogical_create_subscriber
Date
Msg-id 291cd7fcf2d62bea0c4c0301065533431a2bf670.camel@credativ.de
Whole thread Raw
In response to Re: Fixed port 65432 in pglogical_create_subscriber  (William Ivanski <william.ivanski@2ndquadrant.com>)
List pgsql-pkg-debian
Hi William,

Am Samstag, den 26.09.2020, 04:16 -0300 schrieb William Ivanski:
> Thanks for your quick response and for testing without the patch.
> 
> I tested with upstream pglogical, and it works, I'll explain.
> 
> For pglogical to start Postgres on port 5433 on the subscriber, I need
> to set "port = 5433" in the file I specified in "--postgresql-conf",
> then it works as I need. pglogical_create_subscriber will copy this
> file to the path specified in "-D" (PGDATA), and this file will be
> used when pglogical_create_subscriber starts Postgres itself during
> the procedure. As in Debian/Ubuntu we generally don't keep
> postgresql.conf and pg_hba.conf files under PGDATA, after
> pglogical_create_subscriber finishes (I recommend using "-s" or "
> --stop" so pglogical_create_subscriber stops Postgres at the end of
> the procedure), it is safe to delete those files from PGDATA.
> 
> In your case, it seems you are expecting the subscriber to start on
> port 65432, as that's what you specified in "--subscriber-dsn". So you
> need to set "port = 65432" in the file that you specified in "
> --postgresql-conf".

Well, my case is "trying to get the TAP tests running even if another
Postgres is listening on port 5432". Indeed you're right that one can
use --postgresql-conf (Petr Jelinek also suggested that in the upstream
bug I filed[1]), but the TAP tests reuse the same postgresql.conf for
both publisher and subscriber, so that would need more changes anyway.
Or maybe something more has changed and it's possible to run the
pglogical TAP tests these days without a problem if there is another
PostgreSQL listening on 5432 already, I'll need to investigate that when
I get the time, but that is somewhat low priority.

I've uploaded a new pglogical package now which backs out the
problematic patch and sets PGPORT in the TAP tests environment before
running pglogical_create_subscriber, that seems to work just as well (or
at least just as badly as before).


Cheers,

Michael

[1] https://github.com/2ndQuadrant/pglogical/issues/282

-- 
Michael Banck
Projektleiter / Senior Berater
Tel.: +49 2166 9901-171
Fax:  +49 2166 9901-100
Email: michael.banck@credativ.de

credativ GmbH, HRB Mönchengladbach 12080
USt-ID-Nummer: DE204566209
Trompeterallee 108, 41189 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer

Unser Umgang mit personenbezogenen Daten unterliegt
folgenden Bestimmungen: https://www.credativ.de/datenschutz




pgsql-pkg-debian by date:

Previous
From: William Ivanski
Date:
Subject: Re: Fixed port 65432 in pglogical_create_subscriber
Next
From: apt.postgresql.org Repository Update
Date:
Subject: check-pgbackrest updated to version 1.9-2.pgdg+1