From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, vignesh C <vignesh21(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pg_upgrade and logical replication |
Date: | 2024-07-23 03:35:05 |
Message-ID: | CAA4eK1++Zyw0bTqRspo-tHNHoD0zUv1r5TY1mdMNM3UaZqE3Bg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jul 22, 2024 at 8:16 PM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>
> On Mon, Jul 22, 2024 at 03:45:19PM +0530, Amit Kapila wrote:
> > On Mon, Jul 22, 2024 at 7:35 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> >> On Sat, Jul 20, 2024 at 09:03:07PM -0500, Nathan Bossart wrote:
> >> >> This is an extremely expensive way to perform that check, and so I'm
> >> >> wondering why we don't just do
> >> >>
> >> >> SELECT count(*) FROM pg_catalog.pg_subscription;
> >> >>
> >> >> once in count_old_cluster_subscriptions().
> >> >
> >> > Like so...
> >
> > Isn't it better to directly invoke get_subscription_count() in
> > check_new_cluster_subscription_configuration() where it is required
> > rather than in a db-specific general function?
>
> IIUC the old cluster won't be running at that point.
>
Right, the other option would be to move it to the place where we call
check_old_cluster_for_valid_slots(), etc. Initially, it was kept in
the specific function (get_db_rel_and_slot_infos) as we were
mainlining the count at the per-database level but now as we are
changing that I am not sure if calling it from the same place is a
good idea. But OTOH, it is okay to keep it at the place where we
retrieve the required information from the old cluster.
One minor point is the comment atop get_subscription_count() still
refers to the function name as get_db_subscription_count().
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2024-07-23 03:52:11 | Re: Flush pgstats file during checkpoints |
Previous Message | Hayato Kuroda (Fujitsu) | 2024-07-23 03:08:40 | RE: pg_upgrade and logical replication |