From: | vignesh C <vignesh21(at)gmail(dot)com> |
---|---|
To: | Shubham Khanna <khannashubham1197(at)gmail(dot)com> |
Cc: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Euler Taveira <euler(at)eulerto(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Subject: | Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility. |
Date: | 2025-03-19 09:44:48 |
Message-ID: | CALDaNm3wLKFjSJ-4fF4ACBaq+jH3fPeA68OmS3jc_smaOe=6Qw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 19 Mar 2025 at 14:32, Shubham Khanna
<khannashubham1197(at)gmail(dot)com> wrote:
>
>
> Changed -r to -R based on the shared analysis to avoid conflict with
> the --retain option used in pg_upgrade and to maintain consistency
> across tools.
>
> The attached patch contains the suggested change.
Few suggestions:
1) I felt the comments from the function header of
check_and_drop_publications and the comments of the caller should be
interchanged. That will help in understanding the
check_and_drop_publications function more easily:
+ * Since the publications were created before the
consistent LSN, they
+ * remain on the subscriber even after the physical replica is
+ * promoted. Remove these publications from the
subscriber because
+ * they have no use. Additionally, if requested, drop
all pre-existing
+ * publications.
*/
- drop_publication(conn, &dbinfo[i]);
+ check_and_drop_publications(conn, &dbinfo[i]);
+/*
+ * Check and drop the required publications in the given database.
+ */
+static void
+check_and_drop_publications(PGconn *conn, struct LogicalRepInfo *dbinfo)
2) I was not sure if this line "Multiple object types can be specified
by using multiple --removed" is required in documentation, as
currently the only option supported is publications:
+ target server. Multiple object types can be specified by using multiple
+ <option>--remove</option> switches.
+ </para>
I felt this should be added once at least one more object type removal
is included.
Regards,
Vignesh
From | Date | Subject | |
---|---|---|---|
Next Message | vignesh C | 2025-03-19 09:55:27 | Re: Add missing tab completion for VACUUM and ANALYZE with ONLY option |
Previous Message | Andrey Borodin | 2025-03-19 09:25:57 | Re: Using read_stream in index vacuum |