pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix CREATE DATABASE so we can pg_upgrade DBs with OIDs above 2^3
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix CREATE DATABASE so we can pg_upgrade DBs with OIDs above 2^3
@ 2022-11-04 14:40 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2022-11-04 14:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix CREATE DATABASE so we can pg_upgrade DBs with OIDs above 2^3
@ 2022-11-04 14:40 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2022-11-04 14:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2c6d43650d16d91a3e731d236315beffd98db729

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2022-11-04 14:40 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-11-04 14:40 pgsql: Fix CREATE DATABASE so we can pg_upgrade DBs with OIDs above 2^3 Tom Lane <tgl@sss.pgh.pa.us>
2022-11-04 14:40 pgsql: Fix CREATE DATABASE so we can pg_upgrade DBs with OIDs above 2^3 Tom Lane <tgl@sss.pgh.pa.us>

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