You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Don't create pg_type entries for sequences or toast tables.
Commitf7f70d5 left one inconsistency behind: we're still creatingpg_type entries for the composite types of sequences and toast tables,but not arrays over those composites. But there seems precious littlereason to have named composite types for toast tables, and not much moreto have them for sequences (especially given the thought that sequencesmay someday not be standalone relations at all).So, let's close that inconsistency by removing these composite types,rather than adding arrays for them. This buys back a little bit ofthe initial pg_type bloat added by the previous patch, and could bea significant savings in a large database with many toast tables.Aside from a small logic rearrangement in heap_create_with_catalog,this patch mostly needs to clean up some places that were assuming thatpg_class.reltype always has a valid value. Those are really pre-existingbugs, given that it's documented otherwise; notably, the plpgsql changesfix code that gives "cache lookup failed for type 0" on indexes today.But none of these seem interesting enough to back-patch.Also, remove the pg_dump/pg_upgrade infrastructure for propagatinga toast table's pg_type OID into the new database, since we no longerneed that.Discussion:https://postgr.es/m/761F1389-C6A8-4C15-80CE-950C961F5341@gmail.com