Re: Parallel query hangs after a smart shutdown is issued

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: Parallel query hangs after a smart shutdown is issued
Дата
Msg-id CA+hUKGK-1GafK3UE2gARcotsjEdTExznxi1SgnnYJfKAiR_Pcw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Parallel query hangs after a smart shutdown is issued  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Parallel query hangs after a smart shutdown is issued  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Aug 14, 2020 at 4:45 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I wrote:
> > Hmmm ... maybe that should be more like
> >         if (smartShutState != SMART_NORMAL_USAGE &&
> >             backend_type == BACKEND_TYPE_NORMAL)
>
> After some more rethinking and testing, here's a v5 that feels
> fairly final to me.  I realized that the logic in canAcceptConnections
> was kind of backwards: it's better to check the main pmState restrictions
> first and then the smart-shutdown restrictions afterwards.

LGTM.  I tested this a bit today and it did what I expected for
parallel queries and vacuum, on primary and standby.

> I'm assuming we want to back-patch this as far as 9.6, where parallel
> query began to be a thing.

Yeah.  I mean, it's more radical than what I thought we'd be doing for
this, but you could get into real trouble by running in smart shutdown
mode without the autovac infrastructure alive.



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

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Inconsistent behavior of smart shutdown handling for queries with and without parallel workers
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions