Re: suppressing useless wakeups in logical/worker.c

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: suppressing useless wakeups in logical/worker.c
Дата
Msg-id 3220831.1674772625@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: suppressing useless wakeups in logical/worker.c  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: suppressing useless wakeups in logical/worker.c  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
Nathan Bossart <nathandbossart@gmail.com> writes:
> On Thu, Jan 26, 2023 at 04:09:51PM -0500, Tom Lane wrote:
>> Right, so more like this.

> LGTM

Thanks, pushed.

Returning to the prior patch ... I don't much care for this:

+                    /* Maybe there will be a free slot in a second... */
+                    retry_time = TimestampTzPlusSeconds(now, 1);
+                    LogRepWorkerUpdateSyncStartWakeup(retry_time);

We're not moving the goalposts very far on unnecessary wakeups if
we have to do that.  Do we need to get a wakeup on sync slot free?
Although having to send that to every worker seems ugly.  Maybe this
is being done in the wrong place and we need to find a way to get
the launcher to handle it.

As for the business about process_syncing_tables being only called
conditionally, I was already of the opinion that the way it's
getting called is loony.  Why isn't it called from LogicalRepApplyLoop
(and noplace else)?  With more certainty about when it runs, we might
not need so many kluges elsewhere.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Something is wrong with wal_compression
Следующее
От: Tom Lane
Дата:
Сообщение: Re: improving user.c error messages