Skip to content

Commit 992df96

Browse files
committed
Make fallback implementation of pg_memory_barrier() work in 9.2 and 9.3.
Back-patch 9.4-era commit 44cd47c into 9.2 and 9.3. As with my back-patches of yesterday, this was not seen as necessary at the time because we didn't expect barrier.h to need to work before 9.4, but commit 37de8de invalidated that theory. Per an attempt to run gaur and pademelon over old branches they've not been run on since ~2013.
1 parent 9b2dc08 commit 992df96

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/backend/main/main.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242

4343
#include "bootstrap/bootstrap.h"
4444
#include "postmaster/postmaster.h"
45+
#include "storage/barrier.h"
46+
#include "storage/spin.h"
4547
#include "tcop/tcopprot.h"
4648
#include "utils/help_config.h"
4749
#include "utils/memutils.h"
@@ -311,6 +313,12 @@ startup_hacks(const char *progname)
311313

312314
}
313315
#endif /* WIN32 */
316+
317+
/*
318+
* Initialize dummy_spinlock, in case we are on a platform where we have
319+
* to use the fallback implementation of pg_memory_barrier().
320+
*/
321+
SpinLockInit(&dummy_spinlock);
314322
}
315323

316324

0 commit comments

Comments
 (0)