Re: Add client connection check during the execution of the query

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: Add client connection check during the execution of the query
Дата
Msg-id CA+hUKGL1uR0qKy3Hy8-9aFU=jxcGedaKqYTx_gRdyRg0p7cKGw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add client connection check during the execution of the query  (Andres Freund <andres@anarazel.de>)
Ответы Re: Add client connection check during the execution of the query  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
On Fri, Jan 14, 2022 at 4:35 PM Andres Freund <andres@anarazel.de> wrote:
> The more I think about it, the less I see why we *ever* need to re-arm the
> latch in pq_check_connection() in this approach. pq_check_connection() is only
> used from from ProcessInterrupts(), and there's plenty things inside
> ProcessInterrupts() that can cause latches to be reset (e.g. parallel message
> processing causing log messages to be sent to the client, causing network IO,
> which obviously can do a latch reset).

Thanks for the detailed explanation.  I guess I was being overly
cautious and a little myopic, "leave things exactly the way you found
them", so I didn't have to think about any of that.  I see now that
the scenario I was worrying about would be a bug in whatever
latch-wait loop happens to reach this code.  Alright then, here is
just... one... more... patch, this time consuming any latch that gets
in the way and retrying, with no restore.

Вложения

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

Предыдущее
От: "kato-sho@fujitsu.com"
Дата:
Сообщение: Re: fix crash with Python 3.11
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: relcache not invalidated when ADD PRIMARY KEY USING INDEX