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

From: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
To: Shubham Khanna <khannashubham1197(at)gmail(dot)com>
Cc: Ajin Cherian <itsajin(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.
Date: 2025-03-14 12:13:30
Message-ID: CABdArM6q+jaKFWei5k-mNkGZLqt-ega_e1+w26MrQTrDzusiMg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Shubham,

Here are a few comments for the v12 patch.

doc/src/sgml/ref/pg_createsubscriber.sgml :

1.
+ <para>
+ For all source server non-template databases create subscriptions for
+ create subscriptions for databases with the same names on the
+ target server.

is โ€œcreate subscriptions forโ€ repeated? The sentence doesnโ€™t make sense.

2. Typo
+ switches. This option cannot be together with <option>--all</option>.

/cannot be together/cannot be used together/
~~~

3. src/bin/pg_basebackup/pg_createsubscriber.c :
+ /* Establish a connection to the PostgreSQL server */
+ conn = connect_database(opt->pub_conninfo_str, true);

I think comment will be more clear if say โ€œ Establish a connection to
the primary server */ or โ€œsource serverโ€
~~~

src/bin/pg_basebackup/t/042_all_option.pl :

4. As per Ashutosh's comment at [1], tests need to be added to verify
logical replication behavior after using the --all option.
~~~~

Please refer to the attached top-up fix patch, which includes the
above changes along with some cosmetic fixes in the test file
042_all_option.pl.

[1] https://www.postgresql.org/message-id/CAExHW5uJHYAge99oS_iPfGWwZ_eCr2xFCNnifQkGs2GXeMQKGQ%40mail.gmail.com

--
Thanks,
Nisha

Attachment Content-Type Size
0001-Nisha_v12_fixes.patch application/octet-stream 7.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-03-14 12:20:37 Re: Changing the state of data checksums in a running cluster
Previous Message Dagfinn Ilmari Mannsรฅker 2025-03-14 12:12:50 Re: Proposal: manipulating pg_control file from Perl