From 0071fc71277e51723eeb4856eeeb5d25600a429a Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Fri, 11 Mar 2022 10:59:47 +0900 Subject: [PATCH] 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. --- src/backend/access/transam/xloginsert.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c index c260310c4c..83d40b55e6 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 +#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 #define LZ4_MAX_BLCKSZ LZ4_COMPRESSBOUND(BLCKSZ) #else #define LZ4_MAX_BLCKSZ 0