From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Shubham Khanna <khannashubham1197(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>, "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility. |
Date: | 2025-03-18 20:40:36 |
Message-ID: | CAKFQuwbaYnSBc5fgHsoFLW_cUq2u466-3ZpkA+u1Z=-medNgwg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Mar 18, 2025 at 4:47 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)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).
#define OBJECTTYPE_PUBLICATIONS 0x1
- SimpleStringList remove_objects; /* list of object types to remove */
+ SimpleStringList objecttypes_to_remove; /* list of object types to remove
*/
- bits32 remove_objects; /* flag to remove objects on subscriber */
+bits32 objecttypes_to_remove; /* flags indicating which object types to
remove on subscriber */
printf(_(" -r, --remove=OBJECTTYPE remove all objects of the
specified type from specified\n"
" databases on the subscriber; accepts:
publications\n"));
+ * Drop the specified publication of the given database. s/of/in/ ?
publication in the given database
* Drop all publications on the database. s/on/in ? publications in the
given database
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.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2025-03-18 20:40:41 | Re: [RFC] Lock-free XLog Reservation from WAL |
Previous Message | Tom Lane | 2025-03-18 20:38:13 | Re: Add -k/--link option to pg_combinebackup |