summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasahiko Sawada2024-12-09 21:07:06 +0000
committerMasahiko Sawada2024-12-09 21:07:06 +0000
commit724890ffb75c703afc1e0287f5a66b94c2998799 (patch)
tree151b6a4fcbb6cd72b49274e6f92eb01070c69a7f
parent36d0229b8ff5907ccff782e9425d1647401b7e99 (diff)
Include necessary header files in radixtree.h.
When #include'ing radixtree.h with RT_SHMEM, it could happen to raise compiler errors due to missing some declarations of types and functions. This commit also removes the inclusion of postgres.h since it's against our usual convention. Backpatch to v17, where radixtree.h was introduced. Reviewed-by: Heikki Linnakangas, Álvaro Herrera Discussion: https://postgr.es/m/CAD21AoCU9YH%2Bb9Rr8YRw7UjmB%3D1zh8GKQkWNiuN9mVhMvkyrRg%40mail.gmail.com Backpatch-through: 17
-rw-r--r--src/include/lib/radixtree.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/include/lib/radixtree.h b/src/include/lib/radixtree.h
index 88bf695e3f3..1301f3fee44 100644
--- a/src/include/lib/radixtree.h
+++ b/src/include/lib/radixtree.h
@@ -151,13 +151,15 @@
*-------------------------------------------------------------------------
*/
-#include "postgres.h"
-
#include "nodes/bitmapset.h"
#include "port/pg_bitutils.h"
#include "port/simd.h"
#include "utils/dsa.h"
#include "utils/memutils.h"
+#ifdef RT_SHMEM
+#include "miscadmin.h"
+#include "storage/lwlock.h"
+#endif
/* helpers */
#define RT_MAKE_PREFIX(a) CppConcat(a,_)