Re: BUG #17677: pg_upgrade error 14.5->15.0
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: spankov@gotrg.com
Cc: pgsql-bugs@lists.postgresql.org
Date: 2022-11-04T13:35:36Z
Lists: pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes: > I've try to execute CREATE DATABASE command on Postgresql 15.0 instance > manually and got the same error. > ^ > Command was: > CREATE DATABASE "rc16mo_r1_trg_taxcommitmentreporter_fzsymvlz" WITH TEMPLATE > = template0 OID = 4236896942 ENCODING = 'UTF8' LOCALE_PROVIDER = libc LOCALE > = 'en_US.UTF-8';" > I truncated OID parameter to 42362 and succesfully executed command > CREATE DATABASE "rc16mo_r1_trg_taxcommitmentreporter_fzsymvlz" WITH TEMPLATE > = template0 ENCODING = 'UTF8' LOCALE_PROVIDER = libc LOCALE = 'en_US.UTF-8' > OID=42362; Yeah, that evidently is a parser bug: can't handle OIDs above INT_MAX. I thought maybe we could tweak pg_dump to quote the OID value, but nope: # CREATE DATABASE "rc16mo_r1_trg_taxcommitmentreporter_fzsymvlz" WITH TEMPLATE = template0 OID = '4236896942' ENCODING = 'UTF8' LOCALE_PROVIDER = libc LOCALE = 'en_US.UTF-8'; ERROR: oid requires an integer value Somebody really worked at it to make this this broken :-(. I'll see if I can get it fixed in time for 15.1. Thanks for the report! regards, tom lane
Commits
-
Fix CREATE DATABASE so we can pg_upgrade DBs with OIDs above 2^31.
- 34fa0ddae5cf 16.0 landed
- 2c6d43650d16 15.1 landed