Re: AlterSubscription_refresh "wrconn" wrong variable?

Поиск
Список
Период
Сортировка
От Peter Smith
Тема Re: AlterSubscription_refresh "wrconn" wrong variable?
Дата
Msg-id CAHut+PsJ-w=GBx_hP9FUKhRHS9Lb8DvNX+a0dcYrQX8Jp3byhQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: AlterSubscription_refresh "wrconn" wrong variable?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: AlterSubscription_refresh "wrconn" wrong variable?  (Japin Li <japinli@hotmail.com>)
Re: AlterSubscription_refresh "wrconn" wrong variable?  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
On Wed, May 5, 2021 at 12:35 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Peter Smith <smithpb2250@gmail.com> writes:
> > This patch replaces the global "wrconn" in AlterSubscription_refresh with a local variable of the same name, making
itconsistent with other functions in subscriptioncmds.c (e.g. DropSubscription).
 
> > The global wrconn is only meant to be used for logical apply/tablesync worker.
> > Using the global/incorrect wrconn in AlterSubscription_refresh doesn't normally cause any problems, but harm is
stillposslble if the apply worker ever manages to do a subscription refresh. e.g. see [1]
 
>
> Hm.  I would actually place the blame for this on whoever thought
> it was okay to name a global variable something as generic as
> "wrconn".   Let's rename that while we're at it, say to something
> like "tablesync_wrconn" (feel free to bikeshed).

PSA v3 of the patch. Same as before, but now also renames the global
variable from "wrconn" to "lrep_worker_wrconn".

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

Вложения

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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: decoupling table and index vacuum
Следующее
От: Etsuro Fujita
Дата:
Сообщение: Re: Asynchronous Append on postgres_fdw nodes.