From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | Peter Smith <smithpb2250(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pg_createsubscriber - more logging to say if there are no pubs to drop |
Date: | 2025-10-14 18:49:06 |
Message-ID: | CAD21AoCWPOC780qDcXpWLepS_6STmO11rvNDP6_xUe8ihh28vQ@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Oct 14, 2025 at 10:41 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> On Wed, Oct 8, 2025 at 6:34 PM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
> >
> > Hi hackers,
> >
> > While reviewing pg_createsubscriber in another thread, I found some of
> > the current logging to be confusing. Specifically, there is one part
> > that drops all existing publications. Sometimes it might look like
> > this:
> >
> > ----------
> > pg_createsubscriber: dropping all existing publications in database "db2"
> > pg_createsubscriber: dropping publication "pub_exists1" in database "db2"
> > pg_createsubscriber: dropping publication "pub_exists2" in database "db2"
> > pg_createsubscriber: dropping publication "pub_exists3" in database "db2"
> > ----------
> >
> > ~~~
> >
> > OTOH, if there is nothing found to be dropped, then the logging just says:
> >
> > ----------
> > pg_createsubscriber: dropping all existing publications in database "db2"
> > ----------
> >
> > That's the scenario that I found ambiguous. You can't be sure from the
> > logs what happened:
> > - Were there publications found, and were they dropped silently?
> > - Did it not find anything to drop?
> >
> > ~~~
> >
> > Here is a small patch to remove that doubt. Now, if there is nothing
> > found, the logging would look like:
> >
> > ----------
> > pg_createsubscriber: dropping all existing publications in database "db2"
> > pg_createsubscriber: no publications found
> > ----------
> >
> > Thoughts?
>
> Thank you for the patch!
>
> It sounds like a reasonable improvement. I'll push the patch, barring
> any objections.
Done.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2025-10-14 18:49:57 | Re: Non-blocking archiver process |
Previous Message | Jeff Davis | 2025-10-14 18:43:09 | Re: Expanding HOT updates for expression and partial indexes |