Re: POC: Lock updated tuples in tuple_update() and tuple_delete()
От | Alexander Korotkov |
---|---|
Тема | Re: POC: Lock updated tuples in tuple_update() and tuple_delete() |
Дата | |
Msg-id | CAPpHfdu4UfmkZbLPLuZGGsKqdS39CsaZx=hT-POkUn6rQs30qg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: POC: Lock updated tuples in tuple_update() and tuple_delete() (Mason Sharp <masonlists@gmail.com>) |
Ответы |
Re: POC: Lock updated tuples in tuple_update() and tuple_delete()
|
Список | pgsql-hackers |
Hi, Mason! Thank you very much for your review. On Sun, Jan 8, 2023 at 9:33 PM Mason Sharp <masonlists@gmail.com> wrote: > On Fri, Jan 6, 2023 at 4:46 AM Pavel Borisov <pashkin.elfe@gmail.com> wrote: >> Besides, the new version has only some minor changes in the comments >> and the commit message. > It looks good, and the greater the concurrency the greater the benefit will be. Just a few minor suggestions regardingcomments. > > "ExecDeleteAct() have already locked the old tuple for us", change "have" to "has". > > The comments in heapam_tuple_delete() and heapam_tuple_update() might be a little clearer with something like: > > "If the tuple has been concurrently updated, get lock already so that on > retry it will succeed, provided that the caller asked to do this by > providing a lockedSlot." Thank you. These changes are incorporated into v6 of the patch. > Also, not too important, but perhaps better clarify in the commit message that the repeated work is driven by ExecUpdateand ExecDelete and can happen multiple times depending on the concurrency. Hmm... It can't happen arbitrary number of times. If tuple was concurrently updated, the we lock it. Once we lock, nobody can change it until we finish out work. So, I think no changes needed. I'm going to push this if no objections. ------ Regards, Alexander Korotkov
Вложения
В списке pgsql-hackers по дате отправления: