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

From: Shubham Khanna <khannashubham1197(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(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>, 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-19 09:04:10
Message-ID: CAHv8RjJFU=En75Yajse7sBWqJ2MEr8tX99T=0kKOTYT6UXs=Vg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 19, 2025 at 2:14 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Wed, Mar 19, 2025 at 12:29 PM Hayato Kuroda (Fujitsu)
> <kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
> >
> > One comment for the API. Currently the patch introduces new option '--remove',
> > and the short term is '-r'. My suggestion is to use '-R' instead.
> >
> > Background
> > ==========
> > IIUC, we've planned to put outut-logs in some files on the directory [1].
> > This follows what pg_ugprade does.
> >
> > In pg_uprade, -r means "retain SQL and log files even after successful completion" [2].
> > Normally logs would be removed after the sucessful upgrade, but they would not with
> > the option.
> >
> > If we use -r for removing objects in pg_createsubscriber, it would be conflicted
> > with the short term of --retain. This is confusing for users.
> >
>
> We have discussed in the past and in this thread as well to have a
> functionality like pg_upgrade to have LOG and or SQL files in which
> case we may need to have an option for --retain (-r) similar to
> pg_upgrade. So, using -R for this option sounds reasonable to me.
>
> --

Fixed the mentioned issue by changing -r to -R to avoid conflict with
the --retain option used in pg_upgrade. The attached patch at [1]
contains the required change.

[1] - https://www.postgresql.org/message-id/CAHv8RjKbYaCRrzJzmU6gU0jt85xJftzVV-Hu9rXrkb1yFzYTtA%40mail.gmail.com

Thanks and regards,
Shubham Khanna.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jakub Wartak 2025-03-19 09:06:09 Re: Draft for basic NUMA observability
Previous Message Shubham Khanna 2025-03-19 09:01:41 Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.