Re: Restart pg_usleep when interrupted

From: Sami Imseih <samimseih(at)gmail(dot)com>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: Nathan Bossart <nathandbossart(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-07-25 22:27:15
Message-ID: CDF34F36-3A52-47C8-B1D3-5D32A34EC3A7@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I am attaching v3 of the patch which addresses the comments made
earlier by Bertrand about the comment in the patch [1]. Also I will stick with
vacuum_sleep as the name as the function will be inside vacuum.c. I am not
sure we should make this function available outside of vacuum, but I would like
to hear other thoughts.

Also, earlier in the thread, Alvaro mentions what happens
if the sleep time is 0 [2]. In that case, we do not do anything as we check
if sleep time is > 0 microseconds before proceeding with the sleep

[1] https://www.postgresql.org/message-id/ZpDhS4nFX66ItAze%40ip-10-97-1-34.eu-west-3.compute.internal
[2] https://www.postgresql.org/message-id/202407120939.pr6wpjffmxov%40alvherre.pgsql

Regards,

Sami

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2024-07-25 22:29:06 Re: Restart pg_usleep when interrupted
Previous Message Thomas Munro 2024-07-25 22:10:29 Re: Recent 027_streaming_regress.pl hangs