1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-16 17:07:43 +03:00

Don't include execnodes.h in replication/conflict.h

... which silently propagates a lot of headers into many places
via pgstat.h, as evidenced by the variety of headers that this patch
needs to add to seemingly random places.  Add a minimum of typedefs to
conflict.h to be able to remove execnodes.h, and fix the fallout.

Backpatch to 18, where conflict.h first appeared.

Discussion: https://postgr.es/m/202509191927.uj2ijwmho7nv@alvherre.pgsql
This commit is contained in:
Álvaro Herrera
2025-09-25 14:45:08 +02:00
parent 81fc3e28e3
commit 7e638d7f50
6 changed files with 13 additions and 1 deletions

View File

@@ -79,6 +79,7 @@
#include "pg_trace.h"
#include "pgstat.h"
#include "postmaster/autovacuum.h"
#include "storage/condition_variable.h"
#include "storage/pmsignal.h"
#include "storage/proc.h"
#include "storage/procarray.h"

View File

@@ -45,6 +45,7 @@
#include "commands/tablespace.h"
#include "common/file_utils.h"
#include "miscadmin.h"
#include "nodes/miscnodes.h"
#include "pgstat.h"
#include "postmaster/bgwriter.h"
#include "postmaster/startup.h"

View File

@@ -67,6 +67,7 @@
#include "libpq/pqsignal.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "port/atomics.h"
#include "portability/instr_time.h"
#include "postmaster/postmaster.h"
#include "storage/fd.h"

View File

@@ -25,6 +25,7 @@
#include "postgres.h"
#include "access/xlog.h"
#include "executor/instrument.h"
#include "storage/bufmgr.h"
#include "storage/proc.h"
#include "storage/procarray.h"

View File

@@ -11,6 +11,7 @@
#ifndef PGSTAT_H
#define PGSTAT_H
#include "access/transam.h" /* for FullTransactionId */
#include "datatype/timestamp.h"
#include "portability/instr_time.h"
#include "postmaster/pgarch.h" /* for MAX_XFN_CHARS */

View File

@@ -9,9 +9,16 @@
#ifndef CONFLICT_H
#define CONFLICT_H
#include "nodes/execnodes.h"
#include "access/xlogdefs.h"
#include "nodes/pg_list.h"
#include "utils/timestamp.h"
/* Avoid including execnodes.h here */
typedef struct EState EState;
typedef struct ResultRelInfo ResultRelInfo;
typedef struct TupleTableSlot TupleTableSlot;
/*
* Conflict types that could occur while applying remote changes.
*