Re: Diagnostic comment in LogicalIncreaseXminForSlot
От | Amit Kapila |
---|---|
Тема | Re: Diagnostic comment in LogicalIncreaseXminForSlot |
Дата | |
Msg-id | CAA4eK1J-NdZAe5wQirZcZ79JgHB1Ry3OVgay00Q_OJk_nmnD+g@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Diagnostic comment in LogicalIncreaseXminForSlot (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>) |
Ответы |
Re: Diagnostic comment in LogicalIncreaseXminForSlot
|
Список | pgsql-hackers |
On Mon, Jul 12, 2021 at 5:28 PM Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> wrote: > > On Mon, Jul 12, 2021 at 8:39 AM Amit Kapila <amit.kapila16@gmail.com> wrote: >> >> I have noticed that >> a nearby function LogicalIncreaseRestartDecodingForSlot() logs similar >> information after releasing spinlock, so it is better to follow the >> same here as well. > > > Now that you mention it, the code their looks rather suspicious :) > We acquire the spinlock at the beginning of the function but do not release it if (restart_lsn <= slot->data.restart_lsn)or if (current_lsn <= slot->data.confirmed_flush). > Note that we end else if with (current_lsn <= slot->data.confirmed_flush) and after that there is a new if. We release lock in both the if/else conditions, so the code is fine as it is. -- With Regards, Amit Kapila.
В списке pgsql-hackers по дате отправления: