Re: BUG #17677: pg_upgrade error 14.5->15.0

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: spankov(at)gotrg(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17677: pg_upgrade error 14.5->15.0
Date: 2022-11-04 13:35:36
Message-ID: 2281935.1667568936@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2022-11-04 17:15:32 BUG #17678: Script exit code: 1332
Previous Message PG Bug reporting form 2022-11-04 12:30:19 BUG #17677: pg_upgrade error 14.5->15.0