pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix base backup with database OIDs larger than INT32_MAX
Date: Mon, 13 Jan 2020 12:48:02 +0000
Message-ID: <E1iqz8U-0006Kd-Tu@gemulon.postgresql.org> (raw)

Fix base backup with database OIDs larger than INT32_MAX

The use of pg_atoi() for parsing a string into an Oid fails for values
larger than INT32_MAX, since OIDs are unsigned.  Instead, use
atooid().  While this has less error checking, the contents of the
data directory are expected to be trustworthy, so we don't need to go
out of our way to do full error checking.

Discussion: https://www.postgresql.org/message-id/flat/dea47fc8-6c89-a2b1-07e3-754ff1ab094b%402ndquadrant.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/259bbe177808986e5d226ea7ce5a1ebb74657791

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



view thread (2+ messages)

Message-ID: <E1iqz8U-0006Kd-Tu@gemulon.postgresql.org>
Permalink:  ../E1iqz8U-0006Kd-Tu@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1iqz8U-0006Kd-Tu@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: peter@eisentraut.org
  Subject: Re: pgsql: Fix base backup with database OIDs larger than INT32_MAX
  In-Reply-To: <E1iqz8U-0006Kd-Tu@gemulon.postgresql.org>
  References: <E1iqz8U-0006Kd-Tu@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