Prevent postgres_exporter errors during GIN index creation
The function being updated in this MR is used only by the postgres_exporter, which generates prometheus metrics from SQL query results.
When a GIN index is being created or dropped, we cannot inspect its metapage 0 to count pending-list entries. To avoid that error, we skip inspecting such indexes until they reach a state where they have a metapage to inspect.
Issue: https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/16723
Test results in staging: !163 (comment 1153671133)
Edited by Matt Smiley