aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xloginsert.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2022-03-11 10:59:47 +0900
committerMichael Paquier <michael@paquier.xyz>2022-03-11 10:59:47 +0900
commit0071fc71277e51723eeb4856eeeb5d25600a429a (patch)
treec6ae8956363de86e710ba6b3720d5ea693d46b20 /src/backend/access/transam/xloginsert.c
parent352d297dc74feb0bf0dcb255cc0dfaaed2b96c1e (diff)
downloadpostgresql-0071fc71277e51723eeb4856eeeb5d25600a429a.tar.gz
postgresql-0071fc71277e51723eeb4856eeeb5d25600a429a.zip
Fix header inclusion order in xloginsert.c with lz4.h
Per project policy, all system and library headers need to be declared in the backend code after "postgres.h" and before the internal headers, but 4035cd5 broke this policy when adding support for LZ4 in wal_compression. Noticed while reviewing the patch to add support for zstd in this area. This only impacts HEAD, so there is no need for a back-patch.
Diffstat (limited to 'src/backend/access/transam/xloginsert.c')
-rw-r--r--src/backend/access/transam/xloginsert.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c
index c260310c4c8..83d40b55e61 100644
--- a/src/backend/access/transam/xloginsert.c
+++ b/src/backend/access/transam/xloginsert.c
@@ -19,6 +19,10 @@
#include "postgres.h"
+#ifdef USE_LZ4
+#include <lz4.h>
+#endif
+
#include "access/xact.h"
#include "access/xlog.h"
#include "access/xlog_internal.h"
@@ -38,7 +42,6 @@
* backup block image.
*/
#ifdef USE_LZ4
-#include <lz4.h>
#define LZ4_MAX_BLCKSZ LZ4_COMPRESSBOUND(BLCKSZ)
#else
#define LZ4_MAX_BLCKSZ 0