aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/main/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/main/main.c b/src/backend/main/main.c
index 3f6860244ae..67707d43a2b 100644
--- a/src/backend/main/main.c
+++ b/src/backend/main/main.c
@@ -42,6 +42,8 @@
#include "bootstrap/bootstrap.h"
#include "postmaster/postmaster.h"
+#include "storage/barrier.h"
+#include "storage/spin.h"
#include "tcop/tcopprot.h"
#include "utils/help_config.h"
#include "utils/memutils.h"
@@ -313,6 +315,12 @@ startup_hacks(const char *progname)
}
#endif /* WIN32 */
+
+ /*
+ * Initialize dummy_spinlock, in case we are on a platform where we have
+ * to use the fallback implementation of pg_memory_barrier().
+ */
+ SpinLockInit(&dummy_spinlock);
}