RE: Perform streaming logical transactions by background workers and parallel apply
От | houzj.fnst@fujitsu.com |
---|---|
Тема | RE: Perform streaming logical transactions by background workers and parallel apply |
Дата | |
Msg-id | OS0PR01MB5716D738A8F27968806957B194289@OS0PR01MB5716.jpnprd01.prod.outlook.com обсуждение исходный текст |
Ответ на | Re: Perform streaming logical transactions by background workers and parallel apply (Peter Smith <smithpb2250@gmail.com>) |
Список | pgsql-hackers |
On Tuesday, October 18, 2022 10:36 AM Peter Smith <smithpb2250@gmail.com> wrote: > > Hi, here are my review comments for patch v38-0001. Thanks for the comments. > ~~~ > > 12. get_transaction_apply_action > > I still felt like there should be some tablesync checks/comments in > this function, just for sanity, even if it works as-is now. > > For example, are you saying ([3] #22b) that there might be rare cases > where a Tablesync would call to parallel_apply_find_worker? That seems > strange, given that "for streaming transactions that are being applied > in the parallel ... we disallow applying changes on a table that is > not in the READY state". > > ------ I think because we won't try to start parallel apply worker in table sync worker(see the check in parallel_apply_can_start()), so we won't find any worker in parallel_apply_find_worker() which means get_transaction_apply_action will return TRANS_LEADER_SERIALIZE. And get_transaction_apply_action is a function which can be invoked for all kinds of workers(same is true for all apply_handle_xxx functions), so not sure if table sync check/comment is necessary. Best regards, Hou zj
В списке pgsql-hackers по дате отправления: