pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Imseih (AWS), Sami <samimseih@gmail.com>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
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: Mon, 12 Aug 2024 17:04:02 -0500
Message-ID: <ZrqG0tIgP2HbGRm1@nathan> (raw)
In-Reply-To: <cb18c6a7-4394-4488-ad71-0b9826c8899c@iki.fi>
References: <ZrZtdpTN7nLI4L8h@ip-10-97-1-34.eu-west-3.compute.internal>
	<9D64CD7C-CA24-4FF4-9421-3A1A63F87DAC@gmail.com>
	<526E6A51-FE30-47C4-85C8-F2D18877607F@gmail.com>
	<ZrmcoWn1q2hQv0QU@ip-10-97-1-34.eu-west-3.compute.internal>
	<AED4B8D0-3ED1-463C-BA9F-BFF4B511315E@gmail.com>
	<BB742B52-D481-4D5A-926A-4ED4A6ADA98B@gmail.com>
	<ZrowomFX5yMV9zUm@ip-10-97-1-34.eu-west-3.compute.internal>
	<ZrpnfTVK-iaIW98I@nathan>
	<e3297b5e-0b33-4f45-afcd-4b00ba0b3547@gmail.com>
	<cb18c6a7-4394-4488-ad71-0b9826c8899c@iki.fi>

On Tue, Aug 13, 2024 at 12:04:28AM +0300, Heikki Linnakangas wrote:
>> In the case of the patch being proposed by Bertrand, the number of
>> interrupts > will be much more frequent as parallel workers would send a
>> message
> to the leader
>> to update the vacuum delay counters every vacuum_delay_point call.
> 
> Hmm, I wonder if that's a good design, if it results in a lot of interrupts.

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.

> On the patch itself: Making the sleeps in vacuum uninterruptible means that
> vacuum will be more slow to respond to interrupts. If you SIGTERM a vacuum
> process, or hit CTRL-C, you *would* want to exit the sleep ASAP.

Since the delay will typically be pretty small (2 milliseconds by default
for autovacuum), I'm assuming this won't ordinarily be noticeable.  But I
do think it is an important consideration.

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

-- 
nathan





view thread (73+ messages)  latest in thread

Message-ID: <ZrqG0tIgP2HbGRm1@nathan>
Permalink:  ../ZrqG0tIgP2HbGRm1@nathan/
Also on:    postgresql.org/message-id/ZrqG0tIgP2HbGRm1@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, hlinnaka@iki.fi, samimseih@gmail.com, bertranddrouvot.pg@gmail.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com
  Subject: Re: Restart pg_usleep when interrupted
  In-Reply-To: <ZrqG0tIgP2HbGRm1@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