Fix autovacuum crash (#12379)
Fix autovacuum crash (#12379)

Issue is that get_namespace_name() can return NULL values when nspid no
longer exists in the cat cache and the tuple has been deleted from the
relation on disk. This can happen during the normal lifecycle of a tuple
in pg_namespace. And so without a NULL check, the strcmp call is at risk
of crashing autovacuum process.

Fix is to remove the offending calls altogether. Previously we treated
information_schema special in order to vacuum all tables in template0.
That allowed commit 379512a3fbf to keep parity with previous behavior
that vacuumed all tables in non-connectable databases. However, initdb
already freezes all tuples in information_schema tables on database
creation. And even in the worst case where we're at risk of wraparound,
auto-vacuum will force a vacuum regardless of the table/schema.

Discussion: https://groups.google.com/a/greenplum.org/g/gpdb-dev/c/Axe8025WxzM/m/GOVz-dbsCgAJ

Fixes: #12364

Co-authored-by: Alexandra Wang <5cda22597c15ff73f0a45f6f3b7f76b5b7c7a234@vmware.com>
xinzweb/gpdb,greenplum-db/gpdb,xinzweb/gpdb,50wu/gpdb,50wu/gpdb,adam8157/gpdb,50wu/gpdb,adam8157/gpdb,lisakowen/gpdb,adam8157/gpdb,xinzweb/gpdb,xinzweb/gpdb,50wu/gpdb,greenplum-db/gpdb,adam8157/gpdb,xinzweb/gpdb,greenplum-db/gpdb,lisakowen/gpdb,50wu/gpdb,adam8157/gpdb,lisakowen/gpdb,adam8157/gpdb,adam8157/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,xinzweb/gpdb,lisakowen/gpdb,lisakowen/gpdb,adam8157/gpdb,50wu/gpdb,lisakowen/gpdb,xinzweb/gpdb,lisakowen/gpdb,xinzweb/gpdb,50wu/gpdb,lisakowen/gpdb,greenplum-db/gpdb,50wu/gpdb,greenplum-db/gpdb