Thread: pg_upgrade (9.1 to 9.2) bombing on casts
I have this error in a pg_upgrade:
--
Wells Oliver
wellsoliver@gmail.com
psql:pg_upgrade_dump_db.sql:88725: ERROR: UNION could not convert type text[] to integer[]
Command executed:
time \
/usr/lib/postgresql/9.2/bin/pg_upgrade -k \
-b /usr/lib/postgresql/9.1/bin \
-B /usr/lib/postgresql/9.2/bin \
-d /data/postgresql/9.1/test \
-D /data/postgresql/9.2/main \
-o '-D /etc/postgresql/9.1/test' \
-O '-D /etc/postgresql/9.2/main'
In a view using that sort of cast. I thought maybe pg_upgrade would be able to handle any custom casts.. Is there some way of fixing this without removing the offending view?
Wells Oliver
wellsoliver@gmail.com
Wells Oliver escribió: > I have this error in a pg_upgrade: > > psql:pg_upgrade_dump_db.sql:88725: ERROR: UNION could not convert type > text[] to integer[] Have a look at the file and see what's in the mentioned line. My guess is that this is a view definition, or similar, that no longer works. This might be a bug in 9.2. Maybe share the definition here in case someone can provide more detailed insight. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
On Thu, Jul 11, 2013 at 9:55 PM, Wells Oliver <wellsoliver@gmail.com> wrote: > Command executed: > > time \ > /usr/lib/postgresql/9.2/bin/pg_upgrade -k \ > -b /usr/lib/postgresql/9.1/bin \ > -B /usr/lib/postgresql/9.2/bin \ > -d /data/postgresql/9.1/test \ > -D /data/postgresql/9.2/main \ > -o '-D /etc/postgresql/9.1/test' \ > -O '-D /etc/postgresql/9.2/main' In future I suggest you to use --check (from docs: check clusters only, don't change any data) when performing pg_upgrade first. I will show you all the errors but will not affect your cluster. And you can use safe it on a running instance BTW. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA Profile: http://www.linkedin.com/in/grayhemp Phone: USA +1 (415) 867-9984, Russia +7 (901) 903-0499, +7 (988) 888-1979 Skype: gray-hemp Jabber: gray.ru@gmail.com
On Sun, Jul 14, 2013 at 10:42:22PM -0700, Sergey Konoplev wrote: > On Thu, Jul 11, 2013 at 9:55 PM, Wells Oliver <wellsoliver@gmail.com> wrote: > > Command executed: > > > > time \ > > /usr/lib/postgresql/9.2/bin/pg_upgrade -k \ > > -b /usr/lib/postgresql/9.1/bin \ > > -B /usr/lib/postgresql/9.2/bin \ > > -d /data/postgresql/9.1/test \ > > -D /data/postgresql/9.2/main \ > > -o '-D /etc/postgresql/9.1/test' \ > > -O '-D /etc/postgresql/9.2/main' > > In future I suggest you to use --check (from docs: check clusters > only, don't change any data) when performing pg_upgrade first. I will > show you all the errors but will not affect your cluster. And you can > use safe it on a running instance BTW. While that is a good suggstion, it would not have found this error becaues --check does not test the restore of the database schemas. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
On Mon, Jul 15, 2013 at 1:47 AM, Bruce Momjian <bruce@momjian.us> wrote: >> In future I suggest you to use --check (from docs: check clusters >> only, don't change any data) when performing pg_upgrade first. I will >> show you all the errors but will not affect your cluster. And you can >> use safe it on a running instance BTW. > > While that is a good suggstion, it would not have found this error > becaues --check does not test the restore of the database schemas. Sure. Thank you Bruce. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA Profile: http://www.linkedin.com/in/grayhemp Phone: USA +1 (415) 867-9984, Russia +7 (901) 903-0499, +7 (988) 888-1979 Skype: gray-hemp Jabber: gray.ru@gmail.com