Fix CREATE DATABASE so we can pg_upgrade DBs with OIDs above 2^31.
Tom Lane <tgl@sss.pgh.pa.us>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/dbcommands.c | modified | +1 −1 |
| src/backend/commands/define.c | modified | +33 −0 |
| src/backend/parser/gram.y | modified | +2 −2 |
| src/include/commands/defrem.h | modified | +1 −0 |
Discussion
- BUG #17677: pg_upgrade error 14.5->15.0 2 messages · 2022-11-04