On Wed, Mar 19, 2025 at 2:11 AM David G. Johnston <david.g.johns...@gmail.com> wrote: > > On Tue, Mar 18, 2025 at 4:47 AM Amit Kapila <amit.kapil...@gmail.com> wrote: >> >> I don't understand --dry-run part of conversation here. As per >> existing code (or with the patch), we seem to be already printing the >> publications to be dropped in dry-run mode. > > > Sorry, that was me making a bad assumption rather than checking first. > > > I'm still bothered by the last paragraph of the commit message saying to > backup these publications when the preceding one claims strongly and > unconditionally that they are redundant and serve no purpose. See my doc > changes below (the docs, whatever the form, should suffice for motivating > this feature and trying to explain it again in the commit message is > redundant). >
Fixed. > #define OBJECTTYPE_PUBLICATIONS 0x1 > Fixed. > - SimpleStringList remove_objects; /* list of object types to remove */ > + SimpleStringList objecttypes_to_remove; /* list of object types to remove */ > Fixed. > - bits32 remove_objects; /* flag to remove objects on subscriber */ > +bits32 objecttypes_to_remove; /* flags indicating which object types to > remove on subscriber */ > Fixed. > printf(_(" -r, --remove=OBJECTTYPE remove all objects of the > specified type from specified\n" > " databases on the subscriber; accepts: > publications\n")); > Fixed. > + * Drop the specified publication of the given database. s/of/in/ ? > publication in the given database > Fixed. > * Drop all publications on the database. s/on/in ? publications in the given > database > Fixed. > sgml: > How about this flow? > > <para> > Remove all objects of the specified type from specified databases on the > target server. Multiple object types can be specified by using multiple > <option>--remove</option> switches. > </para> > <para> > publications: The "all tables" publications established for this subscriber > are > always removed; specifying this object type causes all other publications > replicated from the source server to be dropped as well. > </para> > <para> > The objects selected to be dropped are individually logged and do show > up in a --dry-run. There is no opportunity to affect or stop the dropping > of the selected objects so consider taking a backup of them using pg_dump. > </para> > > Just add more paragraphs next to "publications:" as we add more object types. > Fixed. The attached patch at [1] contains the suggested changes. [1] - https://www.postgresql.org/message-id/CAHv8RjJNE1ZvWhsgL54iPsJhomhcG%2B-SGPN8AnnwdLmWt6A44A%40mail.gmail.com Thanks and regards, Shubham Khanna.