Re: Suppressing useless wakeups in walreceiver

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: Suppressing useless wakeups in walreceiver
Дата
Msg-id 20220930035141.GA124911@nathanxps13
обсуждение исходный текст
Ответ на Re: Suppressing useless wakeups in walreceiver  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Ответы Re: Suppressing useless wakeups in walreceiver
Список pgsql-hackers
I was surprised to see that this patch was never committed!

On Mon, Jan 31, 2022 at 04:28:11PM +0900, Kyotaro Horiguchi wrote:
> +static void
> +WalRcvComputeNextWakeup(WalRcvInfo *state,
> +                        WalRcvWakeupReason reason,
> +                        TimestampTz now)
> +{
> +    switch (reason)
> +    {
> ...
> +    default:
> +        break;
> +    }
> +}
> 
> Mmm.. there's NUM_WALRCV_WAKEUPS.. But I think we don't need to allow
> the case.  Isn't it better to replace the break with Assert()?

+1

> It might be suitable for another patch, but we can do that
> together. If we passed "now" to the function XLogWalRcvProcessMsg, we
> would be able to remove further several calls to
> GetCurrentTimestamp(), in the function itself and
> ProcessWalSndrMessage (the name is improperly abbreviated..).

While reading the patch, I did find myself wondering if there were some
additional opportunities for reducing the calls to GetCurrentTimestamp().
That was really the only thing that stood out to me.

Thomas, are you planning to continue with this patch?  If not, I don't mind
picking it up.

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



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

Предыдущее
От: Wenchao Zhang
Дата:
Сообщение: Re: Assign TupleTableSlot->tts_tableOid duplicated in tale AM.
Следующее
От: David Rowley
Дата:
Сообщение: Re: disfavoring unparameterized nested loops