Re: Suppressing useless wakeups in walreceiver

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: Suppressing useless wakeups in walreceiver
Дата
Msg-id 20221004175755.GA777541@nathanxps13
обсуждение исходный текст
Ответ на Re: Suppressing useless wakeups in walreceiver  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
Here is an updated patch set with the following changes:

* The creation of the struct for non-shared WAL receiver state is moved to
a prerequisite 0001 patch.  This should help ease review of 0002 a bit.

* I updated the nap time calculation to round up to the next millisecond,
as discussed upthread.

* I attempted to minimize the calls to GetCurrentTimestamp().  The WAL
receiver code already calls this function pretty liberally, so I don't know
if this is important, but perhaps it could make a difference for systems
that don't have something like the vDSO to avoid real system calls.

* I removed the 'tli' argument from functions that now have an argument for
the non-shared state struct.  The 'tli' is stored within the struct, so the
extra argument is unnecessary.

One thing that still bugs me a little bit about 0002 is that the calls to
GetCurrentTimestamp() feel a bit scattered and more difficult to reason
about.  AFAICT 0002 keeps 'now' relatively up-to-date, but it seems
possible that a future change could easily disrupt that.  I don't have any
other ideas at the moment, though.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Вложения

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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: New strategies for freezing, advancing relfrozenxid early
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Can we avoid chdir'ing in resolve_symlinks() ?