From: | "Evan D(dot) Hoffman" <evandhoffman(at)gmail(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Igor Neyman <ineyman(at)perceptron(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: [GENERAL] pg_upgrade fails, "mismatch of relation OID" - 9.1.9 to 9.2.4 |
Date: | 2013-05-10 01:22:55 |
Message-ID: | CABRB-LvcDwDVwSwCD-75wkq-g1_yNP8adu6oZqL1X55Wa0EmzA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Hmm... the database itself predates me, so I can't say for sure what
encoding it was created with, but when I did a "pg_dumpall -s" it
showed every database in the cluster uses "SET client_encoding =
'UTF8';"
On Thu, May 9, 2013 at 7:25 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> On Thu, May 9, 2013 at 05:41:39PM -0400, Evan D. Hoffman wrote:
>> I believe the history of this cluster is that it started on 9.0 and
>> was upgraded to 9.1 via pg_upgrade. The instance I'm working on was
>> created as a streaming replica, then I broke the replication to make
>> it a standalone master specifically for testing pg_upgrade to 9.2.
>
> OK, I did some research on this, using a stripped-down copy of his table
> schema:
>
> CREATE TABLE test(
> x1 bigint,
> x2 bigint,
> x3 CHARACTER varying(40),
> x4 CHARACTER varying(40),
> x5 CHARACTER varying(40),
> x6 CHARACTER varying(40),
> x7 CHARACTER varying(40),
> x8 CHARACTER varying(40),
> x9 boolean,
> x10 CHARACTER varying(40),
> x11 boolean,
> x12 CHARACTER varying(100),
> x13 CHARACTER varying(100),
> x14 DATE,
> x15 DATE,
> x16 CHARACTER varying(10),
> x17 CHARACTER varying(10)
> );
>
> Using my default UTF8 encoding, I see a TOAST table created for all
> versions of Postgres, 9.0 through 9.3. However, if I create a database
> with C locale/Latin1 encoding:
>
> CREATE DATABASE test3 ENCODING 'LATIN1' LC_COLLATE 'C'
> LC_CTYPE 'C' TEMPLATE template0;
>
> I then get a table with no TOAST table. Could the encoding of this
> database have changed? I know pg_upgrade has always tests to see
> old/new clusters had matching "LC_COLLATE" and "LC_CTYPE" match. It is
> possible that the encodings were changed, and pg_upgrade didn't test
> that? I don't think so because pg_dumpall is the one who creates the
> new databases with matching encodings.
>
> Could someone have manually changed the encoding of the 9.1 database in
> the system tables? If so, that would cause this problem.
>
> --
> Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
> EnterpriseDB http://enterprisedb.com
>
> + It's impossible for everything to be true. +
--
Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Satori | 2013-05-10 01:29:40 | Re: psql history on OSX terminal |
Previous Message | Brett Haydon | 2013-05-10 01:01:10 | Re: psql history on OSX terminal |
From | Date | Subject | |
---|---|---|---|
Next Message | Robins Tharakan | 2013-05-10 01:27:35 | Re: Add regression tests for COLLATE |
Previous Message | Bruce Momjian | 2013-05-09 23:25:59 | Re: Re: [GENERAL] pg_upgrade fails, "mismatch of relation OID" - 9.1.9 to 9.2.4 |