pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix failure to advance content pointer in sendFileWithContent.
Date: Mon, 12 Dec 2022 15:39:48 +0000
Message-ID: <E1p4kuB-003EBm-Hc@gemulon.postgresql.org> (raw)

Fix failure to advance content pointer in sendFileWithContent.

If sendFileWithContent were used to send a file larger than the
bbsink buffer size, this would result in corruption. The only
files that are sent via sendFileWithContent are the backup label
file, the tablespace map file, and .done files for WAL segments
included in the backup. Of these, it seems that only the
tablespace_map file can become large enough to cause a problem,
and then only if you have a lot of tablespaces. If you do have
that situation, you might end up with a corrupted
tablespace_map file, which would be bad.

My commit bef47ff85df18bf4a3a9b13bd2a54820e27f3614 introduced
this problem.

Report and patch by Antonin Houska.

Discussion: http://postgr.es/m/15764.1670528645@antos

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8b5ba2f3f40a9c82623a19b551bc5790a84275a2

Modified Files
--------------
src/backend/backup/basebackup.c | 1 +
1 file changed, 1 insertion(+)



view thread (2+ messages)  latest in thread

Message-ID: <E1p4kuB-003EBm-Hc@gemulon.postgresql.org>
Permalink:  ../E1p4kuB-003EBm-Hc@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1p4kuB-003EBm-Hc@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: rhaas@postgresql.org
  Subject: Re: pgsql: Fix failure to advance content pointer in sendFileWithContent.
  In-Reply-To: <E1p4kuB-003EBm-Hc@gemulon.postgresql.org>
  References: <E1p4kuB-003EBm-Hc@gemulon.postgresql.org>

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

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