]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Avoid including utils/timestamp.h in conflict.h.
authorAmit Kapila <akapila@postgresql.org>
Mon, 23 Feb 2026 04:49:05 +0000 (10:19 +0530)
committerAmit Kapila <akapila@postgresql.org>
Mon, 23 Feb 2026 04:49:05 +0000 (10:19 +0530)
conflict.h currently includes utils/timestamp.h despite only requiring
basic timestamp type definitions. This creates unnecessary overhead.

Replace the include with datatype/timestamp.h to provide the necessary
types. This change requires explicitly including utils/timestamp.h in
test_custom_fixed_stats.c, which previously relied on the indirect
inclusion.

Extracted from the larger patch by Andres Freund.
Discussion: https://postgr.es/m/aY-UE-4t7FiYgH3t@alap3.anarazel.de

src/include/replication/conflict.h
src/test/modules/test_custom_stats/test_custom_fixed_stats.c

index 1cade336c9172d82e82ac31ee0eeb6b8d79bde3c..2d9dbcf4d0de105e570ea0323e5635f6170f52c1 100644 (file)
@@ -10,8 +10,8 @@
 #define CONFLICT_H
 
 #include "access/xlogdefs.h"
+#include "datatype/timestamp.h"
 #include "nodes/pg_list.h"
-#include "utils/timestamp.h"
 
 /* Avoid including execnodes.h here */
 typedef struct EState EState;
index 908bd18a7c7fea85854a5cdd09accf06caa6652d..485e08e5c194fb1490985abd09caf8db0000164d 100644 (file)
@@ -18,6 +18,7 @@
 #include "pgstat.h"
 #include "utils/builtins.h"
 #include "utils/pgstat_internal.h"
+#include "utils/timestamp.h"
 
 PG_MODULE_MAGIC_EXT(
                                        .name = "test_custom_fixed_stats",