Move catalog toast table and index declarations

Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-10-22T10:21:11Z
Lists: pgsql-hackers

Attachments

As discussed in [0], here are patches to move the system catalog toast 
table and index declarations from catalog/toasting.h and 
catalog/indexing.h to the respective parent tables' catalog/pg_*.h 
files.  I think it's clearly better to have everything together like this.

The original reason for having it split was that the old genbki system 
produced the output in the order of the catalog files it read, so all 
the toasting and indexing stuff needed to come separately.  But this is 
no longer the case.

The resulting postgres.bki file has some ordering differences *within* 
the toast and index groups, but these should not be significant.  (It's 
basically done in the order of the parent catalogs now rather than 
whatever the old file order was.)

In this patch set, I moved the DECLARE_* lines as is.  In the discussion 
[0] some ideas were floated for altering or tweaking these things, but I 
suggest that can be undertaken as a separate patch set.


[0]: 
https://www.postgresql.org/message-id/20201006201549.em2meighuapttl7n%40alap3.anarazel.de

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Commits

  1. Move catalog index declarations

  2. Move catalog toast table declarations