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 Eisentraut <peter(at)eisentraut(dot)org>, Shubham Khanna <khannashubham1197(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(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>
Subject: Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.
Date: 2025-06-19 05:13:10
Message-ID: CAA4eK1+PoH9prMM3p1xsHVSZyfUwXhJ8oi4qXcF+oc-FUi3zAA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 18, 2025 at 10:32 AM David G. Johnston
<david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
>>
>> The list can be longer than one or two. We may need to provide similar
>> options for other objects, such as replication slots (synced failover
>> replication slots on the physical standby), user-defined functions,
>> triggers, views, materialized views, operators, policies, etc. And
>> then, we would also need 'all' kind of additional option to allow
>> cleaning all such objects. The newly formed subscriber may need a few
>> of the objects that got replicated on the prior physical standby to
>> operate, but not all.
>>
>
> --verb-objecttype=pattern ? (*.* could stand in for all)
>

For some of the pending cases, like synced replication slots, we will
always need to remove all objects, but there could be a few objects
for which we need a pattern, as you are suggesting. So, we can think
of adding such special switches only for those objects, if required,
similar to what pg_dump has for schema or tables.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2025-06-19 05:42:09 Re: pg_dump misses comments on NOT NULL constraints
Previous Message Peter Smith 2025-06-19 05:08:04 Re: [WIP]Vertical Clustered Index (columnar store extension) - take2