Publish autovacuum informations - Mailing list pgsql-hackers

From Guillaume Lelarge
Subject Publish autovacuum informations
Date
Msg-id CAECtzeU_VyakTqtL7mPHo=pdRi4oD4PVuGymjoK+Nw1O9Aaenw@mail.gmail.com
Whole thread Raw
Responses Re: Publish autovacuum informations  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hey,

There are times where I would need more informations on the autovacuum processes.

I'd love to know what each worker is currently doing. I can get something like this from the pg_stat_activity view but it doesn't give me as much informations as the WorkerInfoData struct.

I'd also love to have more informations on the contents of the tables list (how many tables still to process, which table next, what kind of processing they'll get, etc... kinda what you have in the autovac_table struct).

All in all, I want to get informations that are typically stored in shared memory, handled by the autovacuum launcher and autovacuum workers. I first thought I could get that by writing some C functions embedded in an extension. But it doesn't seem to me I can access this part of the shared memory from a C function. If I'm wrong, I'd love to get a pointer on how to do this.

Otherwise, I wonder what would be more welcome: making the shared memory structs handles available outside of the autovacuum processes (and then build an extension to decode the informations I need), or adding functions in core to get access to this information (in that case, no need for an extension)?

Thanks.

Regards.

pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: BUG #12330: ACID is broken for unique constraints
Next
From: Tom Lane
Date:
Subject: Re: Publish autovacuum informations