Avoid including utils/timestamp.h in conflict.h.

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
This commit is contained in:
Amit Kapila 2026-02-23 10:19:05 +05:30
parent ee46584884
commit 308622edf1
2 changed files with 2 additions and 1 deletions

View 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;

View 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",