pgsql: Fix base backup with database OIDs larger than INT32_MAX

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix base backup with database OIDs larger than INT32_MAX
Date: 2020-01-13 12:48:02
Message-ID: E1iqz8U-0006Kd-Tu@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-01-13 20:04:46 pgsql: Reduce size of backend scanner's tables.
Previous Message Amit Kapila 2020-01-13 09:41:59 pgsql: Fix typo.