Re: [HACKERS] logical decoding of two-phase transactions

Поиск
Список
Период
Сортировка
От Peter Smith
Тема Re: [HACKERS] logical decoding of two-phase transactions
Дата
Msg-id CAHut+PtArcW=Jo302Z6DM9jRX4DNVvrCP6kc8+4cWHU7Sb5_Ug@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] logical decoding of two-phase transactions  (Peter Smith <smithpb2250@gmail.com>)
Ответы Re: [HACKERS] logical decoding of two-phase transactions  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On Thu, Mar 25, 2021 at 1:40 PM Peter Smith <smithpb2250@gmail.com> wrote:
>
> On Wed, Mar 24, 2021 at 11:31 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
> >
> > On Tue, Mar 23, 2021 at 3:31 PM Peter Smith <smithpb2250@gmail.com> wrote:
> > >
> > > On Tue, Mar 23, 2021 at 10:44 AM Peter Smith <smithpb2250@gmail.com> wrote:
> > > >
> > > > PSA patches to fix those.
> > > >
> > >
> > > Hi Amit.
> > >
> > > PSA a patch to allow the ALTER SUBSCRIPTION ... REFRESH PUBLICATION to
> > > work when two-phase tristate is PENDING.
> > >
> > > This is necessary for the pg_dump/pg_restore scenario, or for any
> > > other use-case where the subscription might
> > > start off having no tables.
> > >
> >
> > + subrels = GetSubscriptionRelations(MySubscription->oid);
> > +
> > + /*
> > + * If there are no tables then leave the state as PENDING, which
> > + * allows ALTER SUBSCRIPTION ... REFRESH PUBLICATION to work.
> > + */
> > + become_two_phase_enabled = list_length(subrels) > 0;
> >
> > This code is similar at both the places it is used. Isn't it better to
> > move this inside AllTablesyncsReady and if required then we can change
> > the name of the function.
>
> I agree. That way is better.
>
> PSA a patch which changes the AllTableSyncsReady function to now
> include the zero tables check.
>
> (This patch is to be applied on top of all previous patches)
>
> ------

PSA a patch which modifies the FetchTableStates function to use a more
efficient way of testing if the subscription has any tables or not.

(This patch is to be applied on top of all previous v66* patches posted)

------
Kind Regards,
Peter Smith.
Fujitsu Australia.

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: 64-bit XIDs in deleted nbtree pages
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: fix typo in reorderbuffer.c