RE: Optionally automatically disable logical replication subscriptions on error
От | osumi.takamichi@fujitsu.com |
---|---|
Тема | RE: Optionally automatically disable logical replication subscriptions on error |
Дата | |
Msg-id | TYCPR01MB8373E595BCAC1FED7C84D14BED0A9@TYCPR01MB8373.jpnprd01.prod.outlook.com обсуждение исходный текст |
Ответ на | Re: Optionally automatically disable logical replication subscriptions on error (Masahiko Sawada <sawada.mshk@gmail.com>) |
Список | pgsql-hackers |
On Wednesday, March 9, 2022 9:58 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > On Tue, Mar 8, 2022 at 5:07 PM osumi.takamichi@fujitsu.com > <osumi.takamichi@fujitsu.com> wrote: > > > > Kindly have a look at v30. > > Thank you for updating the patch. Here are some comments: Hi, thank you for your review ! > + /* > + * Allocate the origin name in long-lived context for error context > + * message. > + */ > + ReplicationOriginNameForTablesync(MySubscription->oid, > + MyLogicalRepWorker->relid, > + originname, > + sizeof(originname)); > + apply_error_callback_arg.origin_name = > MemoryContextStrdup(ApplyContext, > + > + originname); > > I think it's better to set apply_error_callback_arg.origin_name in the caller > rather than in start_table_sync(). Apply workers set > apply_error_callback_arg.origin_name there and it's not necessarily necessary > to do that in this function. OK. I made this origin_name logic back to the level of ApplyWorkerMain. The new patch v31 is shared in [1]. [1] - https://www.postgresql.org/message-id/TYCPR01MB8373824855A6C4D2178027A0ED0A9%40TYCPR01MB8373.jpnprd01.prod.outlook.com Best Regardfs, Takamichi Osumi
В списке pgsql-hackers по дате отправления: