From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: pg_upgrade, locale and encoding |
Date: | 2014-10-09 20:46:11 |
Message-ID: | 20141009204611.GA19877@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Oct 7, 2014 at 03:52:24PM +0300, Heikki Linnakangas wrote:
> While looking at bug #11431, I noticed that pg_upgrade still seems
> to think that encoding and locale are cluster-wide properties. We
> got per-database locale support in 8.4, and encoding has been
> per-database much longer than that.
>
> pg_upgrade checks the encoding and locale of template0 in both
> clusters, and throws an error if they don't match. But it doesn't
> check the locale or encoding of postgres or template1 databases.
> That leads to problems if e.g. the postgres database was dropped and
> recreated with a different encoding or locale in the old cluster. We
> will merrily upgrade it, but strings in the database will be
> incorrectly encoded.
Wow, I never thought someone would do that, but they certainly could ---
good catch.
> I propose the attached patch, for git master. It's more complicated
> in back-branches, as they still support upgrading from pre-8.4
> clusters. We haven't heard any complaints from the field on this, so
> I don't think it's worth trying to back-patch this.
Agreed.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2014-10-09 20:58:51 | Re: Autovacuum fails to keep visibility map up-to-date in mostly-insert-only-tables |
Previous Message | Kevin Grittner | 2014-10-09 20:28:53 | Re: bad estimation together with large work_mem generates terrible slow hash joins |