Re: Remove extraneous break condition in logical slot advance function

Поиск
Список
Период
Сортировка
От Gurjeet Singh
Тема Re: Remove extraneous break condition in logical slot advance function
Дата
Msg-id CABwTF4X0c97t0PP+A7iTY5JfM76TYa0FUqrGZo1F5ZJomv-48g@mail.gmail.com
обсуждение исходный текст
Ответ на Remove extraneous break condition in logical slot advance function  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Remove extraneous break condition in logical slot advance function  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Oct 20, 2023 at 7:30 PM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
>
> Hi,
>
> There exists an extraneous break condition in
> pg_logical_replication_slot_advance(). When the end of WAL or moveto
> LSN is reached, the main while condition helps to exit the loop, so no
> separate break condition is needed. Attached patch removes it.
>
> Thoughts?

+1 for the patch.

The only advantage I see of the code as it stands right now is that it
avoids one last call to CHECK_FOR_INTERRUPTS() by break'ing early. I
don't think we'd lose much in terms of performance by making one (very
cheap, in common case) extra call of this macro.

Best regards,
Gurjeet
http://Gurje.et



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

Предыдущее
От: Konstantin Knizhnik
Дата:
Сообщение: Custom explain options
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Remove extraneous break condition in logical slot advance function