public inbox for [email protected]  
help / color / mirror / Atom feed
From: Michael Paquier <[email protected]>
To: Jianghua Yang <[email protected]>
Cc: [email protected]
Subject: Re: basebackup: add missing deflateEnd() in gzip compression sink
Date: Mon, 23 Mar 2026 09:31:36 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAAZLFmQOH+fy6=ybEQ-xGdX9Zee2xkXhfuzCfbWweXxJ_6iD-A@mail.gmail.com>
References: <CAAZLFmQNJ0QNArpWEOZXwv=vbumcWKEHz-b1me5gBqRqG67EwQ@mail.gmail.com>
	<[email protected]>
	<CAAZLFmQeS4AFC6mNQNhyZWGUMXEkOmQA11UL28N-6c=CYtqnoA@mail.gmail.com>
	<CAAZLFmQOH+fy6=ybEQ-xGdX9Zee2xkXhfuzCfbWweXxJ_6iD-A@mail.gmail.com>

On Sat, Mar 21, 2026 at 02:22:25PM -0700, Jianghua Yang wrote:
> v1-0001: basebackup: add missing deflateEnd() calls in gzip compression
> sink

After double-checking the whole code, I agree that this is a good
practice to have in the tree.  However, the issue is not worth
bothering in back-branches as the server-side base backup gzip code
relies on allocation and free callbacks, with zlib internals doing
nothing with fds or more persistent states as far as I have read its
code.  For the current use, we'd bloat this data once per tablespace
in a single base backup, safe even if the connection is persistent
(missed that in my first message).

What I am more worried about are future callers of this code, though,
and we care about having a end() call for each matching init[2]() call
in the tree in all the places that rely on gzip internals.  So that's
a good practice on consistency ground, at least.  For these reasons,
applied that on HEAD.

> v1-0002: pg_basebackup: add missing close() for incremental manifest
> file

This one does not matter.  This resource is for a backup manifest and
we are talking about a single one for a single invocation of the
binary.
--
Michael


Attachments:

  [application/pgp-signature] signature.asc (833B, 2-signature.asc)
  download

view thread (6+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: basebackup: add missing deflateEnd() in gzip compression sink
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox