Re: AlterSubscription_refresh "wrconn" wrong variable?

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: AlterSubscription_refresh "wrconn" wrong variable?
Дата
Msg-id CALj2ACVVPp1pTD5_j2Gw_uLFJR9aLSrj=PidHSttM0HhrOFj=Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: AlterSubscription_refresh "wrconn" wrong variable?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: AlterSubscription_refresh "wrconn" wrong variable?  (Peter Smith <smithpb2250@gmail.com>)
Список pgsql-hackers
On Wed, May 5, 2021 at 8:05 AM 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).

I don't think "tablesync_wrconn" is the right name, because wrconn is
also being used in logical replication apply worker. So something like
"apply_worker_wrconn" would be more meaningful.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: Small issues with CREATE TABLE COMPRESSION
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: Small issues with CREATE TABLE COMPRESSION