]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Don't include wait_event.h in pgstat.h
authorÁlvaro Herrera <alvherre@kurilemu.de>
Fri, 6 Mar 2026 15:24:58 +0000 (16:24 +0100)
committerÁlvaro Herrera <alvherre@kurilemu.de>
Fri, 6 Mar 2026 15:24:58 +0000 (16:24 +0100)
wait_event.h itself includes wait_event_types.h, which is a generated
file, so it's nice that we can avoid compiling >10% of the tree just
because that file is regenerated.

To avoid breaking too many third-party modules, we now #include
utils/wait_classes.h in storage/latch.h.  Then, the very common case
of doing
WaitLatch(..., PG_WAIT_EXTENSION)
continues to work by including just storage/latch.h.  (I didn't try to
determine how many modules would actually break if we don't do this, but
this seems a convenient and low-impact measure.)

Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/202602181214.gcmhx2vhlxzp@alvherre.pgsql

79 files changed:
contrib/pg_prewarm/autoprewarm.c
src/backend/access/brin/brin.c
src/backend/access/gin/gininsert.c
src/backend/access/heap/rewriteheap.c
src/backend/access/heap/vacuumlazy.c
src/backend/access/nbtree/nbtree.c
src/backend/access/nbtree/nbtsort.c
src/backend/access/transam/clog.c
src/backend/access/transam/parallel.c
src/backend/access/transam/slru.c
src/backend/access/transam/timeline.c
src/backend/access/transam/twophase.c
src/backend/access/transam/xact.c
src/backend/access/transam/xlog.c
src/backend/access/transam/xlogarchive.c
src/backend/access/transam/xlogfuncs.c
src/backend/access/transam/xlogreader.c
src/backend/access/transam/xlogrecovery.c
src/backend/access/transam/xlogwait.c
src/backend/archive/shell_archive.c
src/backend/backup/basebackup.c
src/backend/backup/basebackup_throttle.c
src/backend/commands/copyfromparse.c
src/backend/commands/copyto.c
src/backend/commands/dbcommands.c
src/backend/commands/vacuum.c
src/backend/executor/nodeAppend.c
src/backend/executor/nodeBitmapHeapscan.c
src/backend/libpq/be-secure-gssapi.c
src/backend/libpq/be-secure-openssl.c
src/backend/libpq/pqmq.c
src/backend/postmaster/autovacuum.c
src/backend/postmaster/auxprocess.c
src/backend/postmaster/bgworker.c
src/backend/postmaster/bgwriter.c
src/backend/postmaster/checkpointer.c
src/backend/postmaster/pgarch.c
src/backend/postmaster/syslogger.c
src/backend/postmaster/walwriter.c
src/backend/replication/logical/applyparallelworker.c
src/backend/replication/logical/launcher.c
src/backend/replication/logical/origin.c
src/backend/replication/logical/reorderbuffer.c
src/backend/replication/logical/slotsync.c
src/backend/replication/logical/snapbuild.c
src/backend/replication/logical/tablesync.c
src/backend/replication/logical/worker.c
src/backend/replication/slot.c
src/backend/replication/syncrep.c
src/backend/replication/walreceiver.c
src/backend/replication/walreceiverfuncs.c
src/backend/replication/walsender.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/file/buffile.c
src/backend/storage/file/copydir.c
src/backend/storage/file/fd.c
src/backend/storage/ipc/dsm_impl.c
src/backend/storage/ipc/ipci.c
src/backend/storage/ipc/procarray.c
src/backend/storage/ipc/procsignal.c
src/backend/storage/ipc/shm_mq.c
src/backend/storage/ipc/signalfuncs.c
src/backend/storage/ipc/standby.c
src/backend/storage/ipc/waiteventset.c
src/backend/storage/lmgr/lwlock.c
src/backend/storage/lmgr/predicate.c
src/backend/storage/lmgr/proc.c
src/backend/storage/smgr/md.c
src/backend/storage/sync/sync.c
src/backend/utils/adt/misc.c
src/backend/utils/adt/pgstatfuncs.c
src/backend/utils/cache/relmapper.c
src/backend/utils/init/miscinit.c
src/common/controldata_utils.c
src/include/pgstat.h
src/include/storage/latch.h
src/test/modules/test_shm_mq/setup.c
src/test/modules/test_shm_mq/test.c
src/test/modules/worker_spi/worker_spi.c

index 89e187425cc77d005a99117337844163ab5b134f..ba0bc8e6d4aca492e900c2c1dd8e93461c86674d 100644 (file)
@@ -48,6 +48,7 @@
 #include "utils/rel.h"
 #include "utils/relfilenumbermap.h"
 #include "utils/timestamp.h"
+#include "utils/wait_event.h"
 
 #define AUTOPREWARM_FILE "autoprewarm.blocks"
 
index 9cd563fd0c3e694ca9496c1681204367568f99da..146ee97a47dc484e184495edd6e1551c490ca97b 100644 (file)
@@ -43,6 +43,7 @@
 #include "utils/memutils.h"
 #include "utils/rel.h"
 #include "utils/tuplesort.h"
+#include "utils/wait_event.h"
 
 /* Magic numbers for parallel state sharing */
 #define PARALLEL_KEY_BRIN_SHARED               UINT64CONST(0xB000000000000001)
index ee9b6106922a9f22fcf1cb70c864017eb95a16a3..c7e38dbe19342f482d6bbbeecfe87b992bf73fc6 100644 (file)
@@ -35,6 +35,7 @@
 #include "utils/builtins.h"
 #include "utils/rel.h"
 #include "utils/typcache.h"
+#include "utils/wait_event.h"
 
 
 /* Magic numbers for parallel state sharing */
index 77fd48eb59ee9138eb689bbbdb0767fef695d9c7..6b19ac3030d671eee2a0198c51ec90597a2155a2 100644 (file)
 #include "storage/procarray.h"
 #include "utils/memutils.h"
 #include "utils/rel.h"
+#include "utils/wait_event.h"
 
 /*
  * State associated with a rewrite operation. This is opaque to the user
index d441122c426428d579d586bfb6e1732962aa700f..82c5b28e0ad55b9bd75435c8bbcb450fc88688aa 100644 (file)
 #include "utils/lsyscache.h"
 #include "utils/pg_rusage.h"
 #include "utils/timestamp.h"
+#include "utils/wait_event.h"
 
 
 /*
index 3dec1ee657d34dbf0f5c5fb78420b7287f532f5f..6d0a6f27f3f2eeb5bba9554d6237bd7b0d071435 100644 (file)
@@ -35,6 +35,7 @@
 #include "utils/fmgrprotos.h"
 #include "utils/index_selfuncs.h"
 #include "utils/memutils.h"
+#include "utils/wait_event.h"
 
 
 /*
index fd9d4087b5af60ff86c0b37c79068c00892eee32..69ef1527e06097dc0aa320a1b5d4de61a72c560f 100644 (file)
@@ -57,6 +57,7 @@
 #include "utils/rel.h"
 #include "utils/sortsupport.h"
 #include "utils/tuplesort.h"
+#include "utils/wait_event.h"
 
 
 /* Magic numbers for parallel state sharing */
index b5c38bbb162572cff6131550752bf10c2d2234f7..3ee1cfdbc24939ba8eee5ad0b0ea616d5bf79b47 100644 (file)
@@ -45,6 +45,7 @@
 #include "storage/proc.h"
 #include "storage/sync.h"
 #include "utils/guc_hooks.h"
+#include "utils/wait_event.h"
 
 /*
  * Defines for CLOG page sizes.  A page is the same BLCKSZ as is used
index e69c4b7424835a0ff1ee568612b8970220b09a86..ab1dfb30e7381dc8b6b84a0372f7eaa28de76690 100644 (file)
@@ -45,6 +45,7 @@
 #include "utils/memutils.h"
 #include "utils/relmapper.h"
 #include "utils/snapmgr.h"
+#include "utils/wait_event.h"
 
 /*
  * We don't want to waste a lot of memory on an error queue which, most of
index 549c7e3e64b41a33ed1bfaed1e414c7fa7550226..556edcbf7cbd007f27355cc1c19186c7de8146cb 100644 (file)
@@ -71,6 +71,7 @@
 #include "storage/fd.h"
 #include "storage/shmem.h"
 #include "utils/guc.h"
+#include "utils/wait_event.h"
 
 /*
  * Converts segment number to the filename of the segment.
index 60ee28665b1f0783303fb6d3ac9c4dfe6294fd8c..68e5f692d26dd8d3c4872c4c41183c279c387b5b 100644 (file)
@@ -41,6 +41,7 @@
 #include "access/xlogdefs.h"
 #include "pgstat.h"
 #include "storage/fd.h"
+#include "utils/wait_event.h"
 
 /*
  * Copies all timeline history files with id's between 'begin' and 'end'
index 5f65fa7b80fc469aa360958ccfff4f8518869e14..55b9f38927d5280d1845cd1570e5c4b51f09a75e 100644 (file)
 #include "utils/injection_point.h"
 #include "utils/memutils.h"
 #include "utils/timestamp.h"
+#include "utils/wait_event.h"
 
 /*
  * Directory where Two-phase commit files reside within PGDATA
index eba4f063168a57d12ecb59c06e763f35d0b984e5..aafc53e016467507590c61837ced3579654e8fd5 100644 (file)
@@ -72,6 +72,7 @@
 #include "utils/timeout.h"
 #include "utils/timestamp.h"
 #include "utils/typcache.h"
+#include "utils/wait_event.h"
 
 /*
  *     User-tweakable parameters
index 354ac645bdc5aa684ef78bd5a17c26e4e762e612..b9b678f37229094fd026303453360e089519c3ba 100644 (file)
 #include "utils/timeout.h"
 #include "utils/timestamp.h"
 #include "utils/varlena.h"
+#include "utils/wait_event.h"
 
 #ifdef WAL_DEBUG
 #include "utils/memutils.h"
index aa0c2fe3afd5f9231c8637796002f4ee0cc83ccf..9a0c8097cb15cf7c4d67a8a9c146d17f387f1966 100644 (file)
@@ -31,6 +31,7 @@
 #include "replication/walsender.h"
 #include "storage/fd.h"
 #include "storage/ipc.h"
+#include "utils/wait_event.h"
 
 /*
  * Attempt to retrieve the specified file from off-line archival storage.
index 800077830675025873ef980e661154c0e0f22afd..ecb3c8c082015860d1915681811fd4598739cde1 100644 (file)
@@ -36,6 +36,7 @@
 #include "utils/memutils.h"
 #include "utils/pg_lsn.h"
 #include "utils/timestamp.h"
+#include "utils/wait_event.h"
 
 /*
  * Backup-related variables.
index 03ada8aa0c5b8eda175e94196c8caa9d48920b99..8cb2110cb99c0f67c9ae4528c43106086ac36a97 100644 (file)
@@ -36,6 +36,7 @@
 #ifndef FRONTEND
 #include "pgstat.h"
 #include "storage/bufmgr.h"
+#include "utils/wait_event.h"
 #else
 #include "common/logging.h"
 #endif
index fbddd7e522c091d527a1fe46030b2fc069aaf5a3..d55a534b138836bb61524c9dd766c9779c32a722 100644 (file)
@@ -65,6 +65,7 @@
 #include "utils/pg_lsn.h"
 #include "utils/ps_status.h"
 #include "utils/pg_rusage.h"
+#include "utils/wait_event.h"
 
 /* Unsupported old recovery command file names (relative to $PGDATA) */
 #define RECOVERY_COMMAND_FILE  "recovery.conf"
index d286ff63123544d275fa927d03644494856e0ff1..bf4630677b4274768023bc14c652233da629c61e 100644 (file)
@@ -60,6 +60,7 @@
 #include "utils/fmgrprotos.h"
 #include "utils/pg_lsn.h"
 #include "utils/snapmgr.h"
+#include "utils/wait_event.h"
 
 
 static int     waitlsn_cmp(const pairingheap_node *a, const pairingheap_node *b,
index 5b5659688189ff70658892c888b1de963bddf961..0b427a688099390a756eb9fe38fa332bd89d144f 100644 (file)
@@ -22,6 +22,7 @@
 #include "archive/shell_archive.h"
 #include "common/percentrepl.h"
 #include "pgstat.h"
+#include "utils/wait_event.h"
 
 static bool shell_archive_configured(ArchiveModuleState *state);
 static bool shell_archive_file(ArchiveModuleState *state,
index 2d74c648335af1e831dae1a64fcfe0ab67010337..ab1fbae800154bb3d5a2a95b15b80054b07212c2 100644 (file)
@@ -48,6 +48,7 @@
 #include "utils/ps_status.h"
 #include "utils/relcache.h"
 #include "utils/resowner.h"
+#include "utils/wait_event.h"
 
 /*
  * How much data do we want to send in one CopyData message? Note that
index e112eed74853769bca0f43978cfc96e196b46385..4d8d90f356bb82668cddee3a2dbb0101d30d87cb 100644 (file)
@@ -19,6 +19,7 @@
 #include "pgstat.h"
 #include "storage/latch.h"
 #include "utils/timestamp.h"
+#include "utils/wait_event.h"
 
 typedef struct bbsink_throttle
 {
index fbd13353efc81d64c7a3f61ca8755331f63055f0..84c8809a88993f58fdcc8d51e6911514f61f9c5c 100644 (file)
@@ -74,6 +74,7 @@
 #include "port/pg_bswap.h"
 #include "utils/builtins.h"
 #include "utils/rel.h"
+#include "utils/wait_event.h"
 
 #define ISOCTAL(c) (((c) >= '0') && ((c) <= '7'))
 #define OCTVALUE(c) ((c) - '0')
index 9ceeff6d99e0bece85fa223267b9d1c78d620f0b..d6ef7275a64ba12499983d5f68ca8ea39f5d0424 100644 (file)
@@ -37,6 +37,7 @@
 #include "utils/memutils.h"
 #include "utils/rel.h"
 #include "utils/snapmgr.h"
+#include "utils/wait_event.h"
 
 /*
  * Represents the different dest cases we need to worry about at
index 740c526e92d9464355c0369320f519f1d956f09d..9b18bb4a17ed63b72aa2e62f433acfb5c5e45491 100644 (file)
@@ -70,6 +70,7 @@
 #include "utils/relmapper.h"
 #include "utils/snapmgr.h"
 #include "utils/syscache.h"
+#include "utils/wait_event.h"
 
 /*
  * Create database strategy.
index b9840637783cfa769097e968acef97debd645fa6..62c1ebdfd9b2059a665ba3646ed5497d7db440c1 100644 (file)
@@ -61,6 +61,7 @@
 #include "utils/memutils.h"
 #include "utils/snapmgr.h"
 #include "utils/syscache.h"
+#include "utils/wait_event.h"
 
 /*
  * Minimum interval for cost-based vacuum delay reports from a parallel worker.
index 39d9442c121853da61b1c84294866c9fbd1cbedf..85c85569b5ed96eab1519595891fc137a9aed167 100644 (file)
@@ -65,6 +65,7 @@
 #include "pgstat.h"
 #include "storage/latch.h"
 #include "storage/lwlock.h"
+#include "utils/wait_event.h"
 
 /* Shared state for parallel-aware Append. */
 struct ParallelAppendState
index c68c26cbf387466030186fbc7712b137714a0b76..e0b6df6476765a65e5a7647ef702cbf9e2e5089b 100644 (file)
@@ -45,6 +45,7 @@
 #include "storage/bufmgr.h"
 #include "utils/rel.h"
 #include "utils/spccache.h"
+#include "utils/wait_event.h"
 
 static void BitmapTableScanSetup(BitmapHeapScanState *node);
 static TupleTableSlot *BitmapHeapNext(BitmapHeapScanState *node);
index 5fb043b86080ff6c1f5ece6c9d70b1a961c3b4d5..540ed62a5ccf6feddeabae32591b067648e21e77 100644 (file)
@@ -24,6 +24,7 @@
 #include "storage/latch.h"
 #include "utils/injection_point.h"
 #include "utils/memutils.h"
+#include "utils/wait_event.h"
 
 
 /*
index 4da6ac22ff9c25745636729a5fa20ecbf16a0ea5..14c6532bb169884b42d8310db4ced9bfb4d13d8f 100644 (file)
@@ -35,6 +35,7 @@
 #include "storage/latch.h"
 #include "utils/guc.h"
 #include "utils/memutils.h"
+#include "utils/wait_event.h"
 
 /*
  * These SSL-related #includes must come after all system-provided headers.
index 7e4a725b79651bce48742240841aebcb4088dbda..22e5164adbf75746db02e5f9404f50f87d020d48 100644 (file)
@@ -23,6 +23,7 @@
 #include "storage/latch.h"
 #include "tcop/tcopprot.h"
 #include "utils/builtins.h"
+#include "utils/wait_event.h"
 
 static shm_mq_handle *pq_mq_handle = NULL;
 static bool pq_mq_busy = false;
index 6fde740465ff9854fbeaa332699e72f57378a3e6..695e187ba115dad2f47dc8efa47aa9c5889e7a96 100644 (file)
 #include "utils/syscache.h"
 #include "utils/timeout.h"
 #include "utils/timestamp.h"
+#include "utils/wait_event.h"
 
 
 /*
index 8ea800c0bbdcd4f3a98e7bf16772d0b1d4a645aa..cf24f662d2717ff224cfdd19a8b2a3519c176002 100644 (file)
@@ -24,6 +24,7 @@
 #include "storage/procsignal.h"
 #include "utils/memutils.h"
 #include "utils/ps_status.h"
+#include "utils/wait_event.h"
 
 
 static void ShutdownAuxiliaryProcess(int code, Datum arg);
index 8678ea4e139ca45becf8dd17e444b478ccd87486..0104a86b9ecd3ee919635fd25567ee889945990f 100644 (file)
@@ -34,6 +34,7 @@
 #include "utils/memutils.h"
 #include "utils/ps_status.h"
 #include "utils/timeout.h"
+#include "utils/wait_event.h"
 
 /*
  * The postmaster's list of registered background workers, in private memory.
index 0956bd39a85a0eb99473d9d86017534c0e7c82ab..1d8947774a9a78c470a53d406e5f3919a9a8d9bc 100644 (file)
@@ -51,6 +51,7 @@
 #include "utils/memutils.h"
 #include "utils/resowner.h"
 #include "utils/timestamp.h"
+#include "utils/wait_event.h"
 
 /*
  * GUC parameters
index e03c19123bc4c27d54f444a1b5bab604492ac860..3c982c6ffaca8cb5809b553e427f041049562179 100644 (file)
@@ -67,6 +67,7 @@
 #include "utils/guc.h"
 #include "utils/memutils.h"
 #include "utils/resowner.h"
+#include "utils/wait_event.h"
 
 
 /*----------
index 82731e452fce949acecb8373df6151c3cf01cc7e..fa4bdfe9ab9ff40fe1adac473d3aaa3a343ea866 100644 (file)
@@ -53,6 +53,7 @@
 #include "utils/ps_status.h"
 #include "utils/resowner.h"
 #include "utils/timeout.h"
+#include "utils/wait_event.h"
 
 
 /* ----------
index 86c5e376b4052f67342a6f350e29c09285611834..9792f6387189470548212514e8343f7d6d0cb6cd 100644 (file)
@@ -51,6 +51,7 @@
 #include "utils/guc.h"
 #include "utils/memutils.h"
 #include "utils/ps_status.h"
+#include "utils/wait_event.h"
 
 /*
  * We read() into a temp buffer twice as big as a chunk, so that any fragment
index 7c0e2809c1785b580c2cd7e8c59e9239c4fadd4d..9cd86ad7022c9d0945ae187193db0459962cf3eb 100644 (file)
@@ -62,6 +62,7 @@
 #include "utils/hsearch.h"
 #include "utils/memutils.h"
 #include "utils/resowner.h"
+#include "utils/wait_event.h"
 
 
 /*
index 7cd6e912a9c085db783fbd86f88bbec190c565bc..d78693ffa8e80f3a875d93c2b49b6d805bd556b3 100644 (file)
 #include "utils/inval.h"
 #include "utils/memutils.h"
 #include "utils/syscache.h"
+#include "utils/wait_event.h"
 
 #define PG_LOGICAL_APPLY_SHM_MAGIC 0x787ca067
 
index e6112e11ec2746c35277eff9f6bcf0a6d15680d5..099641985503b22b774a755dd1c392a3d75b7fcd 100644 (file)
@@ -44,6 +44,7 @@
 #include "utils/pg_lsn.h"
 #include "utils/snapmgr.h"
 #include "utils/syscache.h"
+#include "utils/wait_event.h"
 
 /* max sleep time between cycles (3min) */
 #define DEFAULT_NAPTIME_PER_CYCLE 180000L
index c3271a6fd0ec3757d1c01ef2a99ba3ba9b17997e..26afd8f0af9cf1645d35c06eae9ae847bdd47364 100644 (file)
@@ -95,6 +95,7 @@
 #include "utils/rel.h"
 #include "utils/snapmgr.h"
 #include "utils/syscache.h"
+#include "utils/wait_event.h"
 
 /* paths for replication origin checkpoint files */
 #define PG_REPLORIGIN_CHECKPOINT_FILENAME PG_LOGICAL_DIR "/replorigin_checkpoint"
index e832fa0d8eab5201dd94351b4da77f4a983cfbec..b7664b9000612a1be4bb0e6b5b2f143a4ce31b4e 100644 (file)
 #include "utils/memutils.h"
 #include "utils/rel.h"
 #include "utils/relfilenumbermap.h"
+#include "utils/wait_event.h"
 
 /*
  * Each transaction has an 8MB limit for invalidation messages distributed from
index 0c0399406f30a7e07f8908af9e2b32ec08940103..e75db69e3f647bb186d2c9eb3411de9e363ecaeb 100644 (file)
@@ -79,6 +79,7 @@
 #include "utils/pg_lsn.h"
 #include "utils/ps_status.h"
 #include "utils/timeout.h"
+#include "utils/wait_event.h"
 
 /*
  * Struct for sharing information to control slot synchronization.
index 7f79621b57e38ab3597989b70eb4576a2ca78715..eddb3d9105cac3a4238aee1309742c4f70ab960f 100644 (file)
 #include "utils/memutils.h"
 #include "utils/snapmgr.h"
 #include "utils/snapshot.h"
+#include "utils/wait_event.h"
+
+
 /*
  * Starting a transaction -- which we need to do while exporting a snapshot --
  * removes knowledge about the previously used resowner, so we save it here.
index bccbf61bf392c3c324c315aa09c65c7322dc045e..a0de2efded8c246365d6cc00315ad746274b7aee 100644 (file)
 #include "utils/snapmgr.h"
 #include "utils/syscache.h"
 #include "utils/usercontext.h"
+#include "utils/wait_event.h"
 
 List      *table_states_not_ready = NIL;
 
index f9c4b484754b67866250f1dba4aa3ff3f19a5770..274dc71c6a1f2b82190ec6692c700393d56c8f85 100644 (file)
 #include "utils/snapmgr.h"
 #include "utils/syscache.h"
 #include "utils/usercontext.h"
+#include "utils/wait_event.h"
 
 #define NAPTIME_PER_CYCLE 1000 /* max sleep time between cycles (1s) */
 
index 28c7019402bbf105fab6574d58119bfe555f75cb..a9092fc2382ee61861c8084cadb5c1c2ab6df672 100644 (file)
@@ -59,6 +59,7 @@
 #include "utils/guc_hooks.h"
 #include "utils/injection_point.h"
 #include "utils/varlena.h"
+#include "utils/wait_event.h"
 
 /*
  * Replication slot on-disk data structure.
index d1582a5d71186b449fc217e2f6c553ebd24b41d9..9cecc83ed68c3fda2372592c91bec9e1aa8154f9 100644 (file)
@@ -85,6 +85,7 @@
 #include "tcop/tcopprot.h"
 #include "utils/guc_hooks.h"
 #include "utils/ps_status.h"
+#include "utils/wait_event.h"
 
 /* User-settable parameters for sync rep */
 char      *SyncRepStandbyNames;
index 7c1b8757d7d4b98b699e1400a0585f7365ce3d90..fabe3c730348c8042cf0731b13dd6acc6d9f9a6a 100644 (file)
@@ -79,6 +79,7 @@
 #include "utils/pg_lsn.h"
 #include "utils/ps_status.h"
 #include "utils/timestamp.h"
+#include "utils/wait_event.h"
 
 
 /*
index e62e8a20420bd459510d1e86c00838ce781f666b..45b9d4f09f280288a3268332eb97a0f20dfc6eb5 100644 (file)
@@ -30,6 +30,7 @@
 #include "storage/proc.h"
 #include "storage/shmem.h"
 #include "utils/timestamp.h"
+#include "utils/wait_event.h"
 
 WalRcvData *WalRcv = NULL;
 
index 917d2a0c3f42a92f180f5f874c3119a6af9c69a6..79fc192b171afd1c3409f5c8285201759a1950df 100644 (file)
@@ -98,6 +98,7 @@
 #include "utils/ps_status.h"
 #include "utils/timeout.h"
 #include "utils/timestamp.h"
+#include "utils/wait_event.h"
 
 /* Minimum interval used by walsender for stats flushes, in ms */
 #define WALSENDER_STATS_FLUSH_INTERVAL         1000
index d1babaff02351be07b7c3bd56f2480bcb6a1e073..5f3d083e938864701c48482f87b54cfc8c1aefd2 100644 (file)
@@ -68,6 +68,7 @@
 #include "utils/rel.h"
 #include "utils/resowner.h"
 #include "utils/timestamp.h"
+#include "utils/wait_event.h"
 
 
 /* Note: these two macros only work on shared buffers, not local ones! */
index ddf3a410d6f54b391728b42ef94c9c555d8eefd5..c4afe4d368a3441aec203c5e411040a7b4bdb15b 100644 (file)
@@ -53,6 +53,7 @@
 #include "storage/bufmgr.h"
 #include "storage/fd.h"
 #include "utils/resowner.h"
+#include "utils/wait_event.h"
 
 /*
  * We break BufFiles into gigabyte-sized segments, regardless of RELSEG_SIZE.
index 596d9070fd82d7b043e91007dcec9df9375ac867..5ee141f13a53880b2a5fd002e0591b2e6d476ae1 100644 (file)
@@ -29,6 +29,7 @@
 #include "pgstat.h"
 #include "storage/copydir.h"
 #include "storage/fd.h"
+#include "utils/wait_event.h"
 
 /* GUCs */
 int                    file_copy_method = FILE_COPY_METHOD_COPY;
index 5d07b64a1ef396bfbc3cea5557712465e1ed3394..01f1bd6e687e87cd378058ab83ce4e9f6b960a7c 100644 (file)
 #include "utils/guc_hooks.h"
 #include "utils/resowner.h"
 #include "utils/varlena.h"
+#include "utils/wait_event.h"
 
 /* Define PG_FLUSH_DATA_WORKS if we have an implementation for pg_flush_data */
 #if defined(HAVE_SYNC_FILE_RANGE)
index e208457df2734b23d26e4d3e10407887e84e3035..e8c07805f594ef37abb243b9748f3fd64f450081 100644 (file)
@@ -68,6 +68,7 @@
 #include "storage/fd.h"
 #include "utils/guc.h"
 #include "utils/memutils.h"
+#include "utils/wait_event.h"
 
 #ifdef USE_DSM_POSIX
 static bool dsm_impl_posix(dsm_op op, dsm_handle handle, Size request_size,
index 1f7e933d5007cebbad8a253e3f86fbf4fd4fed7e..a4785daf1e52f40642ea06066ccb446a4adb6855 100644 (file)
@@ -52,6 +52,7 @@
 #include "storage/sinvaladt.h"
 #include "utils/guc.h"
 #include "utils/injection_point.h"
+#include "utils/wait_event.h"
 
 /* GUCs */
 int                    shared_memory_type = DEFAULT_SHARED_MEMORY_TYPE;
index 40312df2cac4d9fae7b219b495ac26d2702b7463..406b8253f8bbf0b6336af33dba7da62bb99acda8 100644 (file)
@@ -67,6 +67,7 @@
 #include "utils/lsyscache.h"
 #include "utils/rel.h"
 #include "utils/snapmgr.h"
+#include "utils/wait_event.h"
 
 #define UINT32_ACCESS_ONCE(var)                 ((uint32)(*((volatile uint32 *)&(var))))
 
index d47d180a32f2eafe3b359133ff400e57d4445a16..7e017c8d53b511f1d371ebc4bf09880145d5c64d 100644 (file)
@@ -34,6 +34,7 @@
 #include "storage/smgr.h"
 #include "tcop/tcopprot.h"
 #include "utils/memutils.h"
+#include "utils/wait_event.h"
 
 /*
  * The SIGUSR1 signal is multiplexed to support signaling multiple event
index 7e9fbc00705524492fd1c6e73692ae298dab8ff5..26b24158ed90fa17c59a8ec08250eac4ca27119c 100644 (file)
@@ -26,6 +26,7 @@
 #include "storage/shm_mq.h"
 #include "storage/spin.h"
 #include "utils/memutils.h"
+#include "utils/wait_event.h"
 
 /*
  * This structure represents the actual queue, stored in shared memory.
index d48b4fe37997454ca3808b736c95972e4aeeabb5..800b699de21dd321bbb9ab4627ac087f811366b6 100644 (file)
@@ -25,6 +25,7 @@
 #include "storage/procarray.h"
 #include "utils/acl.h"
 #include "utils/fmgrprotos.h"
+#include "utils/wait_event.h"
 
 
 /*
index d83afbfb9d62846350bfbe308694f580e6a17736..f3ad90c7c7a51a4be2bd9c8646a58a4be647be97 100644 (file)
@@ -35,6 +35,7 @@
 #include "utils/ps_status.h"
 #include "utils/timeout.h"
 #include "utils/timestamp.h"
+#include "utils/wait_event.h"
 
 /* User-settable GUC parameters */
 int                    max_standby_archive_delay = 30 * 1000;
index 772e350a0c06f38f7172b688c627137edd23ec37..0f228e1e7b86a35f17403d8908d4ce9ec2d7d95b 100644 (file)
@@ -77,6 +77,7 @@
 #include "storage/waiteventset.h"
 #include "utils/memutils.h"
 #include "utils/resowner.h"
+#include "utils/wait_event.h"
 
 /*
  * Select the fd readiness primitive to use. Normally the "most modern"
index 517c55375b4a7697fe47da80b78a14d25a4bd9e1..49382de88fc3d64be4ad78d7d3178a2fd0da5385 100644 (file)
@@ -85,6 +85,7 @@
 #include "storage/procnumber.h"
 #include "storage/spin.h"
 #include "utils/memutils.h"
+#include "utils/wait_event.h"
 
 #ifdef LWLOCK_STATS
 #include "utils/hsearch.h"
index fe75ead350106bccaa9f55c372546a50cb68e314..548b4f66470497496d90e82281290e1c6d653d84 100644 (file)
 #include "utils/guc_hooks.h"
 #include "utils/rel.h"
 #include "utils/snapmgr.h"
+#include "utils/wait_event.h"
 
 /* Uncomment the next line to test the graceful degradation code. */
 /* #define TEST_SUMMARIZE_SERIAL */
index ccf9de0e67cb06e29032a3e3378bdcc8aa58f8df..daf70d9ce2a8fba91ebf5e271bb39d75fe073645 100644 (file)
@@ -53,6 +53,7 @@
 #include "storage/standby.h"
 #include "utils/timeout.h"
 #include "utils/timestamp.h"
+#include "utils/wait_event.h"
 
 /* GUC variables */
 int                    DeadlockTimeout = 1000;
index 443434e4ea86e0192618d3f84cfd48f439c0485b..dee29037b1696c21d4155f3df23a85fe83d2dd59 100644 (file)
@@ -40,6 +40,7 @@
 #include "storage/smgr.h"
 #include "storage/sync.h"
 #include "utils/memutils.h"
+#include "utils/wait_event.h"
 
 /*
  * The magnetic disk storage manager keeps track of open file
index b1accc68b95bd5b2a4007183199b8a3b33e831ab..2c964b6f3d941692a1adaa2eeb3c4f99346d710a 100644 (file)
@@ -31,6 +31,7 @@
 #include "storage/md.h"
 #include "utils/hsearch.h"
 #include "utils/memutils.h"
+#include "utils/wait_event.h"
 
 /*
  * In some contexts (currently, standalone backends and the checkpointer)
index 32a787d7df7b9012ab3a5e59b58b8ef890d09a96..864032c32bfbbfee6db008d70f24a241d1954dab 100644 (file)
@@ -46,6 +46,7 @@
 #include "utils/ruleutils.h"
 #include "utils/syscache.h"
 #include "utils/timestamp.h"
+#include "utils/wait_event.h"
 
 
 /*
index b1df96e7b0b5ebe23cef99bc017a5661b9f03fa4..50ea9e8fb83a61c637a79e65784cd03d147fd7db 100644 (file)
@@ -31,6 +31,7 @@
 #include "utils/acl.h"
 #include "utils/builtins.h"
 #include "utils/timestamp.h"
+#include "utils/wait_event.h"
 
 #define UINT32_ACCESS_ONCE(var)                 ((uint32)(*((volatile uint32 *)&(var))))
 
index 778b14a231899eb2d784b6565064fe01fad54576..3aaf466868d464b97ab38ac838fce3a3f69a315b 100644 (file)
@@ -54,6 +54,7 @@
 #include "storage/lwlock.h"
 #include "utils/inval.h"
 #include "utils/relmapper.h"
+#include "utils/wait_event.h"
 
 
 /*
index 03f6c8479f2face177338a8ebbd8ba8108e686d3..ba191977697979f8178e6d6d8e01515adb13a475 100644 (file)
@@ -55,6 +55,7 @@
 #include "utils/pidfile.h"
 #include "utils/syscache.h"
 #include "utils/varlena.h"
+#include "utils/wait_event.h"
 
 
 #define DIRECTORY_LOCK_FILE            "postmaster.pid"
index 14530c6489a3a60306943a9a8065cd9697d789d6..4ab116afcdef6cb35f2721fcefc529b799ee25e1 100644 (file)
@@ -37,6 +37,7 @@
 #ifndef FRONTEND
 #include "pgstat.h"
 #include "storage/fd.h"
+#include "utils/wait_event.h"
 #endif
 
 /*
index 0e9d2b4c6235f159d82a374cb9ad1bfe492e5987..216b93492ba6a77b1d9935b5af05ae253fb875ff 100644 (file)
@@ -18,7 +18,6 @@
 #include "utils/backend_progress.h" /* for backward compatibility */   /* IWYU pragma: export */
 #include "utils/backend_status.h"      /* for backward compatibility */        /* IWYU pragma: export */
 #include "utils/pgstat_kind.h"
-#include "utils/wait_event.h"  /* for backward compatibility */        /* IWYU pragma: export */
 
 
 /* avoid including access/transam.h */
index fbdadc8695963241246a988ca4f87ed43ddfa573..053a32ecf9d3e3f0b4df1dd1eb9444857005d744 100644 (file)
 #include <signal.h>
 
 #include "storage/waiteventset.h"      /* for WL_* arguments to WaitLatch */
+#include "utils/wait_classes.h"  /* for backward compatibility */      /* IWYU pragma: keep */
+
 
 /*
  * Latch structure should be treated as opaque and only accessed through
index 36bb255922c2d567af16a7d54a9827f2fdc062a8..4f40a61e3d928c4ae43580dcc6a8f863613ea042 100644 (file)
@@ -22,6 +22,7 @@
 #include "storage/shm_toc.h"
 #include "test_shm_mq.h"
 #include "utils/memutils.h"
+#include "utils/wait_event.h"
 
 typedef struct
 {
index ce97e6e1aa4539d9ee24ea0823170a8453cf5009..0e55287e51015c1b2de90b8c8bcf6cdeb41292f1 100644 (file)
@@ -17,6 +17,7 @@
 #include "miscadmin.h"
 #include "pgstat.h"
 #include "storage/proc.h"
+#include "utils/wait_event.h"
 #include "varatt.h"
 
 #include "test_shm_mq.h"
index d1e4a2bd9520c38f7727fdaba6033ac505ea04d6..b89954279c06d86b2a7633860ea1cb98efd4109b 100644 (file)
@@ -39,6 +39,7 @@
 #include "utils/acl.h"
 #include "utils/builtins.h"
 #include "utils/snapmgr.h"
+#include "utils/wait_event.h"
 
 PG_MODULE_MAGIC;