Re: Suppressing useless wakeups in walreceiver

Поиск
Список
Период
Сортировка
Искать
От
Nathan Bossart
Тема
Re: Suppressing useless wakeups in walreceiver
Дата
Msg-id
20221010181014.GC993859@nathanxps13
Ответ на
Список
Дерево обсуждения
Suppressing useless wakeups in walreceiver Thomas Munro <thomas.munro@gmail.com>
Re: Suppressing useless wakeups in walreceiver Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Suppressing useless wakeups in walreceiver Thomas Munro <thomas.munro@gmail.com>
Re: Suppressing useless wakeups in walreceiver Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Thomas Munro <thomas.munro@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Thomas Munro <thomas.munro@gmail.com>
Re: Suppressing useless wakeups in walreceiver Thomas Munro <thomas.munro@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Tom Lane <tgl@sss.pgh.pa.us>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Thomas Munro <thomas.munro@gmail.com>
Re: Suppressing useless wakeups in walreceiver Thomas Munro <thomas.munro@gmail.com>
Re: Suppressing useless wakeups in walreceiver Thomas Munro <thomas.munro@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Thomas Munro <thomas.munro@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Thomas Munro <thomas.munro@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Thomas Munro <thomas.munro@gmail.com>
Re: Suppressing useless wakeups in walreceiver Thomas Munro <thomas.munro@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Thomas Munro <thomas.munro@gmail.com>
Re: Suppressing useless wakeups in walreceiver Thomas Munro <thomas.munro@gmail.com>
Re: Suppressing useless wakeups in walreceiver Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Suppressing useless wakeups in walreceiver Thomas Munro <thomas.munro@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Suppressing useless wakeups in walreceiver Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
Re: Suppressing useless wakeups in walreceiver Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Suppressing useless wakeups in walreceiver Nathan Bossart <nathandbossart@gmail.com>
On Mon, Oct 10, 2022 at 10:51:14AM -0700, Nathan Bossart wrote:
>> +                /* Find the soonest wakeup time, to limit our nap. */
>> +                nextWakeup = INT64_MAX;
>> +                for (int i = 0; i < NUM_WALRCV_WAKEUPS; ++i)
>> +                    nextWakeup = Min(state.wakeup[i], nextWakeup);
>> +                nap = Max(0, (nextWakeup - now + 999) / 1000);

Hm.  We should probably be more cautious here since nextWakeup is an int64
and nap is an int.  My guess is that we should just set nap to -1 if
nextWakeup > INT_MAX.

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


В списке pgsql-hackers по дате отправления
От: Corey Huinker
Дата:
От: Fabien COELHO
Дата:
FAQ