pg.ddx.io pgsql-hackers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Imseih (AWS), Sami <samimseih@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Restart pg_usleep when interrupted
Date: Thu, 15 Aug 2024 16:13:29 -0500
Message-ID: <Zr5veViqvtCUeUwp@nathan> (raw)
In-Reply-To: <ZrxH5r1tdfGBcLjz@ip-10-97-1-34.eu-west-3.compute.internal>
References: <ZrqG0tIgP2HbGRm1@nathan>
<2b5ac681-11d5-470d-af40-89ead9a868aa@gmail.com>
<Zrt3ReA-nB7MJn2q@nathan>
<90ec1618-58db-46b3-8c9b-13616ac839a7@gmail.com>
<ZruCZOKzS0LGAGTb@nathan>
<ac329991-7cfa-4006-b155-97ba19c5705d@gmail.com>
<ZruMe-ppopQX4uP8@nathan>
<b612b9cd-b59e-43d1-bb8a-e100c5ab9849@gmail.com>
<ZrvQhkrqFrLbu4kl@nathan>
<ZrxH5r1tdfGBcLjz@ip-10-97-1-34.eu-west-3.compute.internal>
On Wed, Aug 14, 2024 at 06:00:06AM +0000, Bertrand Drouvot wrote:
> I gave it more thoughts and I don't think we have to choose between the two.
> The 1 Hz approach reduces the number of interrupts and Sami's patch provides a
> way to get "accurate" delay in case of interrupts. I think both have their own
> benefit.
Is it really that important to delay with that level of accuracy? In most
cases, the chances of actually interrupting a given vacuum delay point are
pretty small. Even in the extreme scenario you tested with ~350K
interrupts in a 19 minute vacuum, you only saw a 10-15% difference in total
time. I wouldn't say I'm diametrically opposed to this patch, but I do
think we need to carefully consider whether it's worth the extra code.
Separately, I've been wondering whether it's worth allowing the sleep to be
interrupted in certain cases, such as SIGINT and SIGTERM. That should
address one of Heikki's points.
--
nathan
view thread (73+ messages) latest in thread
Message-ID: <Zr5veViqvtCUeUwp@nathan> Permalink: ../Zr5veViqvtCUeUwp@nathan/ Also on: postgresql.org/message-id/Zr5veViqvtCUeUwp@nathan ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-hackers@postgresql.org Cc: nathandbossart@gmail.com, bertranddrouvot.pg@gmail.com, samimseih@gmail.com, hlinnaka@iki.fi, tgl@sss.pgh.pa.us, robertmhaas@gmail.com Subject: Re: Restart pg_usleep when interrupted In-Reply-To: <Zr5veViqvtCUeUwp@nathan> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox