postgres.git / summary / log / commit / refs

commit    0071fc71277e51723eeb4856eeeb5d25600a429a
Author:   Michael Paquier <michael@paquier.xyz>
Date:     Fri Mar 11 01:59:47 2022 +0000
First released in: 15.0

    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 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 [parent: 352d297dc74f]