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