Do not rely on pgstat.h to indirectly include storage/ headers.
authorAndres Freund <[email protected]>
Sat, 3 Apr 2021 03:01:14 +0000 (20:01 -0700)
committerAndres Freund <[email protected]>
Sat, 3 Apr 2021 03:02:47 +0000 (20:02 -0700)
An upcoming patch might remove the (now indirect) proc.h
include (which in turn includes other headers), and it's cleaner for
the modified files to include their dependencies directly anyway...

Discussion: https://postgr.es/m/20210402194458[email protected]

contrib/pg_stat_statements/pg_stat_statements.c
src/backend/postmaster/pgarch.c
src/backend/postmaster/pgstat.c
src/backend/replication/walreceiver.c
src/backend/storage/lmgr/lmgr.c
src/backend/utils/adt/misc.c

index 6feea2ab4f4bb50e86a3a50201e77ac7afbb75d4..1141d2b0673e2c0e437011e57c7737b6a0561692 100644 (file)
@@ -76,6 +76,8 @@
 #include "pgstat.h"
 #include "storage/fd.h"
 #include "storage/ipc.h"
+#include "storage/lwlock.h"
+#include "storage/shmem.h"
 #include "storage/spin.h"
 #include "tcop/utility.h"
 #include "utils/acl.h"
index 746c836d42099caa03d65b2dc3862c3abf66b82f..dfc7abbc975c3ac6d62d02a782969096c1cca75f 100644 (file)
@@ -44,7 +44,9 @@
 #include "storage/ipc.h"
 #include "storage/latch.h"
 #include "storage/pmsignal.h"
+#include "storage/proc.h"
 #include "storage/procsignal.h"
+#include "storage/shmem.h"
 #include "utils/guc.h"
 #include "utils/ps_status.h"
 
index de239136f48642faea80eba14d33184ccd5af809..498d6ee12368aef2ea20eb77ab66898cfad1ef8d 100644 (file)
@@ -61,6 +61,7 @@
 #include "storage/latch.h"
 #include "storage/lmgr.h"
 #include "storage/pg_shmem.h"
+#include "storage/proc.h"
 #include "storage/procsignal.h"
 #include "storage/sinvaladt.h"
 #include "utils/ascii.h"
index 2b6fa4019b8228a57e22d80be34d6e1219670029..9a0e3806fcf187ec1c7e83b6ae97d6102ac8c84c 100644 (file)
@@ -69,6 +69,7 @@
 #include "replication/walsender.h"
 #include "storage/ipc.h"
 #include "storage/pmsignal.h"
+#include "storage/proc.h"
 #include "storage/procarray.h"
 #include "storage/procsignal.h"
 #include "utils/acl.h"
index 5736d03083f1a362e79fe80152170014fc989ade..cdf2266d6d53ee4e62b1b0a6e87db6bdd424eb77 100644 (file)
@@ -23,6 +23,7 @@
 #include "miscadmin.h"
 #include "pgstat.h"
 #include "storage/lmgr.h"
+#include "storage/proc.h"
 #include "storage/procarray.h"
 #include "storage/sinvaladt.h"
 #include "utils/inval.h"
index 634f574d7eb891e52e01ba60529030eb28de2ad8..88faf4dfd724a034f1e8f22657bef024cce91fc0 100644 (file)
@@ -36,6 +36,7 @@
 #include "postmaster/syslogger.h"
 #include "rewrite/rewriteHandler.h"
 #include "storage/fd.h"
+#include "storage/latch.h"
 #include "tcop/tcopprot.h"
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"