On Wed, Mar 19, 2025 at 3:15 PM vignesh C <vignes...@gmail.com> wrote: > > On Wed, 19 Mar 2025 at 14:32, Shubham Khanna > <khannashubham1...@gmail.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) >
Fixed. > 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. > Fixed. The attached patch contains the suggested changes. Thanks and regards, Shubham Khanna.
v24-0001-Support-for-dropping-all-publications-in-pg_crea.patch
Description: Binary data