Simplify autovacuum's TOAST-to-main-relation reloptions map.

The ar_relid and ar_hasrelopts members of the av_relation struct
can be removed.  ar_relid isn't used by anything, and we only need
ar_hasrelopts because we add an entry to the map even when the main
table has no reloptions set.  If we instead only add entries for
tables with reloptions set, we can take the presence of an entry to
mean the main table has some.

Reviewed-by: Michael Paquier <[email protected]>
Reviewed-by: Sami Imseih <[email protected]>
Tested-by: Greg Burd <[email protected]>
Tested-by: solai v <[email protected]>
Discussion: https://postgr.es/m/aFRxC1W_kZU9OjJ9%40nathan

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/81920f24a47e9580af8e25a72f6b5b660b69fee1

Modified Files
--------------
src/backend/postmaster/autovacuum.c | 32 +++++++++-----------------------
1 file changed, 9 insertions(+), 23 deletions(-)

Reply via email to