Re: Restart pg_usleep when interrupted

From: "Imseih (AWS), Sami" <samimseih(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Restart pg_usleep when interrupted
Date: 2024-08-13 15:47:51
Message-ID: 90ec1618-58db-46b3-8c9b-13616ac839a7@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 8/13/24 10:09 AM, Nathan Bossart wrote:
> On Mon, Aug 12, 2024 at 05:35:08PM -0500, Imseih (AWS), Sami wrote:
>>> Skimming the last few messages of that thread [0], it looks like Bertrand
>>> is exploring ways to avoid so many interrupts. I guess the unavoidable
>>> question is whether this work is still worthwhile given that improvement.
>> The way the instrumentation in [0] dealt with interrupts was too complex,
>> which is why it seemed better to handle the restart the remainder of the
>> sleep in the sleep function
> Can you elaborate on how it is too complex?
>
[0] made vacuum_delay_point more complex as it has to
instrument cost_delay at an interval to reduce the number
of interrupts to the leader.

On the other hand, with allowing the sleep to deal with
interrupts,no additional logic to space out instrumentation
is required.

Regards,

Sami

[0] https://commitfest.postgresql.org/49/5027/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2024-08-13 15:57:24 Re: Restart pg_usleep when interrupted
Previous Message Peter Eisentraut 2024-08-13 15:11:50 Re: tiny step toward threading: reduce dependence on setlocale()