Re: Can a child process detect postmaster death when in pg_usleep?

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Can a child process detect postmaster death when in pg_usleep?
Дата
Msg-id CALj2ACV6omyMurs0y2KWpEr7S-wE7ziR-NimFwB9Or+tF2R1rA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Can a child process detect postmaster death when in pg_usleep?  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Can a child process detect postmaster death when in pg_usleep?
Re: Can a child process detect postmaster death when in pg_usleep?
Список pgsql-hackers
On Thu, Apr 15, 2021 at 11:48 AM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
> > We definitely have replaced a lot of sleeps with latch.c primitives
> > over the past few years, since we got WL_EXIT_ON_PM_DEATH and
> > condition variables.  There may be many more to improve...  You
> > mentioned autovacuum... yeah, Stephen fixed one of these with commit
> > 4753ef37, but yeah it's not great to have those others in there...
>
> I have not looked at the commit 4753ef37 previously, but it
> essentially addresses the problem with pg_usleep for vacuum delay. I'm
> thinking we can also replace pg_usleep in below places based on the
> fact that pg_usleep should be avoided in 1) short waits in a loop 2)
> when wait time is dependent on user configurable parameters. And using
> WaitLatch may require us to add wait event types to WaitEventTimeout
> enum, but that's okay.

I'm attaching 3 patches that replace pg_usleep with WaitLatch: 0001 in
lazy_truncate_heap, 0002 in do_pg_stop_backup and 0003 for Pre and
Post Auth Delay. Regression tests pass with these patches. Please
review them.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

Вложения

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

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Performance degradation of REFRESH MATERIALIZED VIEW
Следующее
От: Mark Dilger
Дата:
Сообщение: Re: pg_amcheck option to install extension