From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rudolf van der Leeden <rudolf.vanderleeden@scoreloop.com>
Cc: pgsql-admin@postgresql.org, Rudolf van der Leeden <vanderleeden@logicunited.com>
Subject: Re: Upgrading DBs with type=citext from 9.0.5 to 9.1.1 using pg_upgrade and create extension
Date: Mon, 21 Nov 2011 09:51:00 -0500
Message-ID: <9017.1321887060@sss.pgh.pa.us> (raw)
In-Reply-To: <42DFCA4F-34A9-4265-9A99-A45E45021FFA@logicunited.com>
References: <42DFCA4F-34A9-4265-9A99-A45E45021FFA@logicunited.com>
Rudolf van der Leeden <rudolf.vanderleeden@scoreloop.com> writes:
> we are running into a problem with the following upgrade scenario:
> Current DB (9.0.5, 300G) is using a table with 2 citext columns and indexes on both columns.
> Using pg_upgrade to move from 9.0.5 to 9.1.1 works OK and is done (without the ANALYZE) in 30s.
> Because we are using the citext type, the following statement has been executed after the upgrade:
> CREATE EXTENSION citext FROM unpackaged
> SELECTs are now possible, but we are having problems with UPDATE:
> ERROR: could not determine which collation to use for string comparison
Hmm. I think the citext update script is missing a couple of things.
Try this after the CREATE EXTENSION step:
update pg_attribute set attcollation = 100 where atttypid = 'citext'::regtype;
It looks like pg_index.indcollation is an issue too, but the least
fragile way to fix that might be to drop and recreate indexes on
citext columns.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, rudolf.vanderleeden@scoreloop.com, vanderleeden@logicunited.com
Subject: Re: Upgrading DBs with type=citext from 9.0.5 to 9.1.1 using pg_upgrade and create extension
In-Reply-To: <9017.1321887060@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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