Re: refactoring basebackup.c - Mailing list pgsql-hackers

From Robert Haas
Subject Re: refactoring basebackup.c
Date
Msg-id CA+TgmoYwKj1Lt_xopMPi+_tBqzjJwsXUBT1uDE4SM50ZY63vZQ@mail.gmail.com
Whole thread Raw
In response to Re: refactoring basebackup.c  (Dipesh Pandit <dipesh.pandit@gmail.com>)
Responses Re: refactoring basebackup.c
List pgsql-hackers
On Fri, Jan 28, 2022 at 3:54 AM Dipesh Pandit <dipesh.pandit@gmail.com> wrote:
> Thanks. This makes sense.
>
> +#ifdef HAVE_LIBZ
> +   /*
> +    * If the user has requested a server compressed archive along with archive
> +    * extraction at client then we need to decompress it.
> +    */
> +   if (format == 'p' && compressmethod == COMPRESSION_GZIP &&
> +           compressloc == COMPRESS_LOCATION_SERVER)
> +       streamer = bbstreamer_gzip_decompressor_new(streamer);
> +#endif
>
> I think it is not required to have HAVE_LIBZ check in pg_basebackup.c
> while creating a new gzip writer/decompressor. This check is already
> in place in bbstreamer_gzip_writer_new() and bbstreamer_gzip_decompressor_new()
> and it throws an error in case the build does not have required library
> support. I have removed this check from pg_basebackup.c and updated
> a delta patch. The patch can be applied on v5 patch.

Right, makes sense. Committed with that change, plus I realized the
skip count in the test case file was wrong after the changes I made
yesterday, so I fixed that as well.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Hamid Akhtar
Date:
Subject: Re: Parameter for planner estimate of recursive queries
Next
From: Robert Haas
Date:
Subject: Re: Server-side base backup: why superuser, not pg_write_server_files?