Monitor GIN pending list size
Following up with https://docs.google.com/document/d/1de_71VNzEpxrkl8sALkmOFn-JTLIrAVXx2-TBzD7zfw/edit#bookmark=id.peqhyihru9df and in context of https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/14367, we'd like to get the size of GIN pending lists monitored:
For a single index, we can get the metric from this query:
select n_pending_pages * current_setting('block_size') from gin_metapage_info(get_raw_page('index_issues_on_description_trigram',0));
The idea would be to enumerate GIN indexes, get their info and report that back to prometheus. We would need to find an inexpensive query for this given the frequency. It's fine not to export this from all PG hosts, one would be enough.