pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix CREATE DATABASE so we can pg_upgrade DBs with OIDs above 2^3
Date: Fri, 04 Nov 2022 14:40:03 +0000
Message-ID: <E1oqxrY-000PdR-6I@gemulon.postgresql.org> (raw)

Fix CREATE DATABASE so we can pg_upgrade DBs with OIDs above 2^31.

Commit aa0105141 repeated one of the oldest mistakes in our book:
thinking that OID is the same as int32.  It isn't of course, and
unsurprisingly the first person who came along with a database
OID above 2 billion broke it.  Repair.

Per bug #17677 from Sergey Pankov.  Back-patch to v15.

Discussion: https://postgr.es/m/17677-a99fa067d7ed71c9@postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/34fa0ddae5cf27dd93a5855b30083185d4bb5a5b

Modified Files
--------------
src/backend/commands/dbcommands.c |  2 +-
src/backend/commands/define.c     | 33 +++++++++++++++++++++++++++++++++
src/backend/parser/gram.y         |  4 ++--
src/include/commands/defrem.h     |  1 +
4 files changed, 37 insertions(+), 3 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1oqxrY-000PdR-6I@gemulon.postgresql.org>
Permalink:  ../E1oqxrY-000PdR-6I@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oqxrY-000PdR-6I@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: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Fix CREATE DATABASE so we can pg_upgrade DBs with OIDs above 2^3
  In-Reply-To: <E1oqxrY-000PdR-6I@gemulon.postgresql.org>
  References: <E1oqxrY-000PdR-6I@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