1
0
mirror of https://github.com/postgres/postgres.git synced 2026-01-26 09:41:40 +03:00

Stop including {brin,gin}_tuple.h in tuplesort.h

Doing this meant that those two headers, which are supposed to be
internal to their corresponding index AMs, were being included pretty
much universally, because tuplesort.h is included by execnodes.h which
is very widely used.  Stop that, and fix fallout.

We also change indexing.h to no longer include execnodes.h (tuptable.h
is sufficient), and relscan.h to no longer include buf.h (pointless
since c2fe139c20).

Author: Mario González <gonzalemario@gmail.com>
Discussion: https://postgr.es/m/CAFsReFUcBFup=Ohv_xd7SNQ=e73TXi8YNEkTsFEE2BW7jS1noQ@mail.gmail.com
This commit is contained in:
Álvaro Herrera
2026-01-12 18:09:36 +01:00
parent b96a9fd76f
commit 225d1df1d2
15 changed files with 18 additions and 5 deletions

View File

@@ -9,6 +9,7 @@
*/
#include "postgres.h"
#include "access/genam.h"
#include "access/gist.h"
#include "access/htup.h"
#include "access/htup_details.h"

View File

@@ -31,8 +31,9 @@
#include "tcop/tcopprot.h"
#include "utils/datum.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "utils/builtins.h"
#include "utils/rel.h"
#include "utils/typcache.h"
/* Magic numbers for parallel state sharing */

View File

@@ -14,6 +14,7 @@
*/
#include "postgres.h"
#include "access/genam.h"
#include "access/htup_details.h"
#include "access/relation.h"
#include "access/table.h"

View File

@@ -14,6 +14,7 @@
*/
#include "postgres.h"
#include "access/genam.h"
#include "access/htup_details.h"
#include "access/table.h"
#include "catalog/catalog.h"

View File

@@ -34,6 +34,7 @@
#include "common/string.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "storage/fd.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"

View File

@@ -32,6 +32,7 @@
#include "commands/user.h"
#include "libpq/crypt.h"
#include "miscadmin.h"
#include "port/pg_bitutils.h"
#include "storage/lmgr.h"
#include "utils/acl.h"
#include "utils/builtins.h"

View File

@@ -14,6 +14,7 @@
#include "postgres.h"
#include "access/amapi.h"
#include "access/commit_ts.h"
#include "access/genam.h"
#include "access/gist.h"

View File

@@ -38,6 +38,7 @@
#include "utils/fmgroids.h"
#include "utils/lsyscache.h"
#include "utils/timestamp.h"
#include "utils/typcache.h"
#include "utils/xml.h"
/* GUC parameters */

View File

@@ -29,6 +29,7 @@
#include "utils/inval.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"
#include "utils/typcache.h"
static MemoryContext LogicalRepRelMapContext = NULL;

View File

@@ -51,6 +51,7 @@
#include "postgres.h"
#include "access/genam.h"
#include "access/table.h"
#include "catalog/pg_sequence.h"
#include "catalog/pg_subscription_rel.h"

View File

@@ -35,6 +35,7 @@
#include "utils/lsyscache.h"
#include "utils/rel.h"
#include "utils/syscache.h"
#include "utils/typcache.h"
/* Default values assigned to new pg_statistic tuples. */
#define DEFAULT_STATATT_NULL_FRAC Float4GetDatum(0.0) /* stanullfrac */

View File

@@ -18,7 +18,6 @@
#include "access/itup.h"
#include "nodes/tidbitmap.h"
#include "port/atomics.h"
#include "storage/buf.h"
#include "storage/relfilelocator.h"
#include "storage/spin.h"
#include "utils/relcache.h"

View File

@@ -16,7 +16,7 @@
#define INDEXING_H
#include "access/htup.h"
#include "nodes/execnodes.h"
#include "executor/tuptable.h"
#include "utils/relcache.h"
/*

View File

@@ -29,8 +29,10 @@
#ifndef EXECNODES_H
#define EXECNODES_H
#include "access/skey.h"
#include "access/tupconvert.h"
#include "executor/instrument.h"
#include "executor/instrument_node.h"
#include "fmgr.h"
#include "lib/ilist.h"
#include "lib/pairingheap.h"

View File

@@ -21,8 +21,6 @@
#ifndef TUPLESORT_H
#define TUPLESORT_H
#include "access/brin_tuple.h"
#include "access/gin_tuple.h"
#include "access/itup.h"
#include "executor/instrument_node.h"
#include "executor/tuptable.h"
@@ -31,6 +29,9 @@
#include "utils/relcache.h"
#include "utils/sortsupport.h"
/* We don't want this file to depend on AM-specific header files */
typedef struct BrinTuple BrinTuple;
typedef struct GinTuple GinTuple;
/*
* Tuplesortstate and Sharedsort are opaque types whose details are not