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

From: Nathan Bossart <nathan(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Simplify autovacuum's TOAST-to-main-relation reloptions map.
Date: 2026-08-20 20:56:59
Message-ID: E1wx9oo-00000001PMa-3kiD@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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 <michael(at)paquier(dot)xyz>
Reviewed-by: Sami Imseih <samimseih(at)gmail(dot)com>
Tested-by: Greg Burd <greg(at)burd(dot)me>
Tested-by: solai v <solai(dot)cdac(at)gmail(dot)com>
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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Jeff Davis 2026-08-20 21:06:33 pgsql: hashtext: fix fragile code.
Previous Message Bruce Momjian 2026-08-20 19:33:18 pgsql: doc: change "allowed in->on the standby server."