Re: Restart pg_usleep when interrupted - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Restart pg_usleep when interrupted
Date
Msg-id ZruMe-ppopQX4uP8@nathan
Whole thread Raw
In response to Re: Restart pg_usleep when interrupted  ("Imseih (AWS), Sami" <samimseih@gmail.com>)
Responses Re: Restart pg_usleep when interrupted
Re: Restart pg_usleep when interrupted
List pgsql-hackers
On Tue, Aug 13, 2024 at 11:07:46AM -0500, Imseih (AWS), Sami wrote:
> Having to add special handling to space out instrumentation
> directly in vacuum_delay_point seems very odd to me. I don't
> think vacuum_delay_point should have to worry about this.
> 
> Also,
> 1/ what is an appropriate interval to collect these stats?
> 2/ What if there are other callers in the future that wish
> to instrument parallel vacuum workers? they will need to implement
> similar logic.

None of this seems intractable to me.  1 Hz seems like an entirely
reasonable place to start, and it is very easy to change (or to even make
configurable).  pg_stat_progress_vacuum might show slightly old values in
this column, but that should be easy enough to explain in the docs if we
are really concerned about it.  If other callers want to do something
similar, maybe we should add a more generic implementation in
backend_progress.c.

-- 
nathan



pgsql-hackers by date:

Previous
From: "Imseih (AWS), Sami"
Date:
Subject: Re: Restart pg_usleep when interrupted
Next
From: Robert Haas
Date:
Subject: Re: pg_verifybackup: TAR format backup verification