Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.

From: Shubham Khanna <khannashubham1197(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Euler Taveira <euler(at)eulerto(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, vignesh C <vignesh21(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>
Subject: Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.
Date: 2025-03-27 08:05:41
Message-ID: CAHv8RjKU24jCHR2fOHocmdSTqhu7ige5UQsUQMkaTZniLc9DbA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 27, 2025 at 12:16 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Wed, Mar 26, 2025 at 4:02 PM Shubham Khanna
> <khannashubham1197(at)gmail(dot)com> wrote:
> >
>
> Let's combine 0001 and 0002.
>

Combined 0001 and 0002.

> A few minor comments:
> *
> + If database name is not specified in publisher-server, it will try to
> + connect with postgres/template1 database to fetch the databases from
> + primary.
>
> Can we change the above to: "If the database name is not specified in
> publisher-server, the postgres database will be used, or if that does
> not exist, template1 will be used."
>

Fixed.

> *
> + Create one subscription on the target server for each non-template
> + database on the source server that allows connections, excluding
> + template databases or databases with connection restrictions.
>
> The following text proposed by Euler seems better: "Create one
> subscription per database on the target server. Exceptions are
> template databases and databases that don't allow connections."
>
> Please use this one at the above and other places where required.
>

Fixed.

The attached patches contain the suggested changes. They also address
the comments provided by Kuroda-san (at [1]).

[1] - https://www.postgresql.org/message-id/OSCPR01MB149660B6D00665F47896CA812F5A12%40OSCPR01MB14966.jpnprd01.prod.outlook.com

Thanks and regards,
Shubham Khanna.

Attachment Content-Type Size
v23-0001-Enhance-pg_createsubscriber-to-fetch-and-append-.patch application/octet-stream 12.8 KB
v23-0002-Synopsis-for-all-option.patch application/octet-stream 1.5 KB
v23-0003-Additional-test-cases.patch application/octet-stream 6.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitrii Bondar 2025-03-27 08:13:12 Re: [fixed] Trigger test
Previous Message Richard Guo 2025-03-27 07:48:03 Re: Remove vardata parameters from eqjoinsel_inner