Re: refactoring basebackup.c

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Dipesh Pandit <dipesh(dot)pandit(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: refactoring basebackup.c
Date: 2022-01-28 13:42:19
Message-ID: CA+TgmoYwKj1Lt_xopMPi+_tBqzjJwsXUBT1uDE4SM50ZY63vZQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 28, 2022 at 3:54 AM Dipesh Pandit <dipesh(dot)pandit(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-01-28 13:44:09 Re: Server-side base backup: why superuser, not pg_write_server_files?
Previous Message Michael Paquier 2022-01-28 13:42:15 Re: pg_upgrade should truncate/remove its logs before running