Pushed the rest as a single commit.  Thanks!

BTW to show the impact this has on the tree, I rebuilt the inclusion
tables I described previously[1] before and after this commit.  This
table shows how many files include each header before and after, and the
difference between those two.  I'm really surprised that files like
storage/dsm.h and storage/dsa.h are now used by several hundred files
less than before (I didn't even realize they were so heavily included).
I'm not at all surprised that gin_tuple.h which was previously being
included by 730 files is now being include by only 2 (and brin_tuple
also now used only by 15 files instead of 743) -- this is exactly what I
set out to fix here.

[1] https://postgr.es/m/[email protected]


               include                │ num includes original │ num includes 
patched │ delta 
──────────────────────────────────────┼───────────────────────┼──────────────────────┼───────
 storage/dsm.h                        │                  3997 │                 
2359 │  1638
 utils/dsa.h                          │                  2547 │                 
1209 │  1338
 port/atomics.h                       │                  3354 │                 
2097 │  1257
 nodes/tidbitmap.h                    │                  1803 │                 
1041 │   762
 lib/pairingheap.h                    │                  2571 │                 
1814 │   757
 utils/snapshot.h                     │                  2142 │                 
1394 │   748
 access/gin_tuple.h                   │                   730 │                 
   2 │   728
 access/brin_internal.h               │                   749 │                 
  21 │   728
 access/ginblock.h                    │                   748 │                 
  20 │   728
 access/brin_tuple.h                  │                   743 │                 
  15 │   728
 access/amapi.h                       │                   870 │                 
 143 │   727
 access/genam.h                       │                  1121 │                 
 397 │   724
 utils/typcache.h                     │                   810 │                 
  87 │   723
 storage/off.h                        │                  3964 │                 
3259 │   705
 storage/itemptr.h                    │                  3639 │                 
2934 │   705
 access/htup.h                        │                  3288 │                 
2592 │   696
 utils/sortsupport.h                  │                  1828 │                 
1234 │   594
 storage/bufpage.h                    │                  2068 │                 
1494 │   574
 utils/relcache.h                     │                  3196 │                 
2694 │   502
 nodes/pg_list.h                      │                  4989 │                 
4488 │   501
 nodes/nodes.h                        │                  6044 │                 
5543 │   501
 access/tupdesc.h                     │                  4029 │                 
3530 │   499
 catalog/pg_attribute.h               │                  4031 │                 
3532 │   499
 access/transam.h                     │                  2675 │                 
2214 │   461
 common/relpath.h                     │                  4292 │                 
3866 │   426
 nodes/bitmapset.h                    │                  4386 │                 
4089 │   297
 storage/fd.h                         │                  2583 │                 
2422 │   161
 access/skey.h                        │                  1165 │                 
1018 │   147
 storage/fileset.h                    │                  1616 │                 
1524 │    92
 storage/sharedfileset.h              │                  1276 │                 
1184 │    92
 storage/spin.h                       │                  2736 │                 
2647 │    89
 executor/instrument.h                │                   744 │                 
 691 │    53
 nodes/memnodes.h                     │                  1177 │                 
1124 │    53
 utils/memutils.h                     │                  1175 │                 
1122 │    53
 nodes/miscnodes.h                    │                   745 │                 
 692 │    53
 utils/logtape.h                      │                   730 │                 
 677 │    53
 utils/tuplesort.h                    │                   727 │                 
 674 │    53
 lib/simplehash.h                     │                   724 │                 
 671 │    53
 access/tupconvert.h                  │                   717 │                 
 664 │    53
 utils/sharedtuplestore.h             │                   715 │                 
 662 │    53
 nodes/execnodes.h                    │                   712 │                 
 659 │    53
 nodes/plannodes.h                    │                   836 │                 
 785 │    51
 access/attmap.h                      │                   859 │                 
 810 │    49
 storage/condition_variable.h         │                   949 │                 
 901 │    48
 utils/tuplestore.h                   │                   908 │                 
 860 │    48
 access/itup.h                        │                   930 │                 
 883 │    47
 access/tupmacs.h                     │                  1347 │                 
1301 │    46
 storage/proclist_types.h             │                  1723 │                 
1693 │    30
 utils/queryenvironment.h             │                  1056 │                 
1034 │    22
 nodes/primnodes.h                    │                  2289 │                 
2281 │     8

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"No renuncies a nada. No te aferres a nada."


Reply via email to