0002-Remove-brin-gin_tuple.h-from-tuplesort.h.patch
text/x-patch
Filename: 0002-Remove-brin-gin_tuple.h-from-tuplesort.h.patch
Type: text/x-patch
Part: 0
Message:
[PATCH} Move instrumentation structs
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch 0002
Subject: Remove brin/gin_tuple.h from tuplesort.h
| File | + | − |
|---|---|---|
| contrib/pageinspect/gistfuncs.c | 1 | 0 |
| src/backend/access/gin/gininsert.c | 1 | 0 |
| src/backend/catalog/pg_attrdef.c | 1 | 0 |
| src/backend/replication/logical/sequencesync.c | 1 | 0 |
| src/include/nodes/execnodes.h | 1 | 0 |
| src/include/utils/tuplesort.h | 3 | 2 |
From 4e46a068f685c14d769257dba75f237589a93e90 Mon Sep 17 00:00:00 2001 From: Mario Gonzalez <mario.gonzalez@enterprisedb.com> Date: Thu, 6 Nov 2025 17:50:36 -0300 Subject: [PATCH 2/4] Remove brin/gin_tuple.h from tuplesort.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because execnodes.h depends on struct definitions that were in genam.h, which it no longer gets because of the aforementioned removal. Author: Álvaro Herrera <alvherre@kurilemu.de> --- contrib/pageinspect/gistfuncs.c | 1 + src/backend/access/gin/gininsert.c | 1 + src/backend/catalog/pg_attrdef.c | 1 + src/backend/replication/logical/sequencesync.c | 1 + src/include/nodes/execnodes.h | 1 + src/include/utils/tuplesort.h | 5 +++-- 6 files changed, 8 insertions(+), 2 deletions(-) diff --git a/contrib/pageinspect/gistfuncs.c b/contrib/pageinspect/gistfuncs.c index de3746a156b..190353ec354 100644 --- a/contrib/pageinspect/gistfuncs.c +++ b/contrib/pageinspect/gistfuncs.c @@ -9,6 +9,7 @@ */ #include "postgres.h" +#include "access/genam.h" #include "access/gist.h" #include "access/htup.h" #include "access/htup_details.h" diff --git a/src/backend/access/gin/gininsert.c b/src/backend/access/gin/gininsert.c index b92204e2862..45404cb78ab 100644 --- a/src/backend/access/gin/gininsert.c +++ b/src/backend/access/gin/gininsert.c @@ -33,6 +33,7 @@ #include "utils/datum.h" #include "utils/memutils.h" #include "utils/rel.h" +#include "utils/typcache.h" /* Magic numbers for parallel state sharing */ diff --git a/src/backend/catalog/pg_attrdef.c b/src/backend/catalog/pg_attrdef.c index 29f5691bee9..e8bdb52cb00 100644 --- a/src/backend/catalog/pg_attrdef.c +++ b/src/backend/catalog/pg_attrdef.c @@ -14,6 +14,7 @@ */ #include "postgres.h" +#include "access/genam.h" #include "access/htup_details.h" #include "access/relation.h" #include "access/table.h" diff --git a/src/backend/replication/logical/sequencesync.c b/src/backend/replication/logical/sequencesync.c index e093e65e540..b665c694209 100644 --- a/src/backend/replication/logical/sequencesync.c +++ b/src/backend/replication/logical/sequencesync.c @@ -52,6 +52,7 @@ #include "postgres.h" #include "access/table.h" +#include "access/genam.h" #include "catalog/pg_sequence.h" #include "catalog/pg_subscription_rel.h" #include "commands/sequence.h" diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 79da9305408..29bcd7dfc05 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -29,6 +29,7 @@ #ifndef EXECNODES_H #define EXECNODES_H +#include "access/skey.h" #include "access/tupconvert.h" #include "executor/instrument.h" #include "fmgr.h" diff --git a/src/include/utils/tuplesort.h b/src/include/utils/tuplesort.h index 06c5c1de4e4..c844899007a 100644 --- a/src/include/utils/tuplesort.h +++ b/src/include/utils/tuplesort.h @@ -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 -- 2.39.5