Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, Shubham Khanna <khannashubham1197(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <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-17 03:14:17
Message-ID: CAA4eK1KFV8Uvy7vwJhQSU1t-=TWL1XC-pPL3VWcMFoditOfW-A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Mar 15, 2025 at 8:03 PM David G. Johnston
<david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
> On Friday, March 14, 2025, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>>
>>
>> Style-1 sounds reasonable to me, but how exactly we want to do. One
>> idea is to have short and long switches like -r and
>> --remove_exiting_object=publication. The user would be allowed to give
>> multiple options like -r publications -r slots, etc.
>
>
> Either “existing” nor “object” are needed, a one-word long form suffices. Drop, remove, or prune. If we want a short form option we should choose Remove and use -r; both D and P are already taken.
>
> So, I marginally prefer —prune with no short-form option; followed by —remove/-r
>

I am inclined towards "--remove/-r" as that will be relatively more
straightforward to follow for users.

> Communicating the semantic meaning of “prune” in the option name, we aren’t removing all objects of the given type, tips the balance for me. But that can just be communicated in the description so it isn’t a strong desire.
>

BTW, with this option, we will be removing all the publications
present on the subscriber because on standby there shouldn't be any
more. But that may not be true for other objects, so we must
communicate it via the description.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Isaac Morland 2025-03-17 03:31:13 Re: TOAST versus toast
Previous Message Robert Haas 2025-03-17 03:12:35 Re: PATCH: warn about, and deprecate, clear text passwords