mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +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:
@@ -84,6 +84,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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
struct EState;
|
||||
struct ResultRelInfo;
|
||||
struct TupleTableSlot;
|
||||
|
||||
|
||||
/*
|
||||
* Conflict types that could occur while applying remote changes.
|
||||
*
|
||||
@@ -58,8 +65,8 @@ typedef enum
|
||||
*/
|
||||
typedef struct ConflictTupleInfo
|
||||
{
|
||||
TupleTableSlot *slot; /* tuple slot holding the conflicting local
|
||||
* tuple */
|
||||
struct TupleTableSlot *slot; /* tuple slot holding the conflicting
|
||||
* local tuple */
|
||||
Oid indexoid; /* OID of the index where the conflict
|
||||
* occurred */
|
||||
TransactionId xmin; /* transaction ID of the modification causing
|
||||
@@ -69,14 +76,15 @@ typedef struct ConflictTupleInfo
|
||||
* conflicting local row occurred */
|
||||
} ConflictTupleInfo;
|
||||
|
||||
extern bool GetTupleTransactionInfo(TupleTableSlot *localslot,
|
||||
extern bool GetTupleTransactionInfo(struct TupleTableSlot *localslot,
|
||||
TransactionId *xmin,
|
||||
RepOriginId *localorigin,
|
||||
TimestampTz *localts);
|
||||
extern void ReportApplyConflict(EState *estate, ResultRelInfo *relinfo,
|
||||
extern void ReportApplyConflict(struct EState *estate, struct ResultRelInfo *relinfo,
|
||||
int elevel, ConflictType type,
|
||||
TupleTableSlot *searchslot,
|
||||
TupleTableSlot *remoteslot,
|
||||
struct TupleTableSlot *searchslot,
|
||||
struct TupleTableSlot *remoteslot,
|
||||
List *conflicttuples);
|
||||
extern void InitConflictIndexes(ResultRelInfo *relInfo);
|
||||
extern void InitConflictIndexes(struct ResultRelInfo *relInfo);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user