pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedLC_COLLATE and pg_upgrade
6+ messages / 3 participants
[nested] [flat]
* LC_COLLATE and pg_upgrade
@ 2011-02-10 16:56 Bernhard Schrader <bernhard.schrader@innogames.de>
2011-02-14 13:18 ` Re: LC_COLLATE and pg_upgrade Bernhard Schrader <bernhard.schrader@innogames.de>
0 siblings, 1 reply; 6+ messages in thread
From: Bernhard Schrader @ 2011-02-10 16:56 UTC (permalink / raw)
To: pgsql-admin
Hi all,
I just tried to pg_upgrade a PostgreSQL-8.4 to 9.0.
pg_upgrade stopped with this message:
"old and new cluster lc_collate values do not match"
So i checked the LC_COLLATE on 8.4 and 9.0:
8.4:
postgres=# show lc_collate;
lc_collate
------------
en_US.utf8
(1 row)
9.0:
postgres=# show lc_collate;
lc_collate
------------
en_US.UTF-8
(1 row)
Well... I think you see my problem, i don't even know if it is really a
problem...
Is it possible just to change the lc_collate on the 8.4 machine?
Obviously its the same encoding, or am i wrong?
My second Question, but not that urgent is about two databases which
have LC_COLLATE=C, is there a safe way to get it to UTF-8?
regards
Bernhard
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: LC_COLLATE and pg_upgrade
2011-02-10 16:56 LC_COLLATE and pg_upgrade Bernhard Schrader <bernhard.schrader@innogames.de>
@ 2011-02-14 13:18 ` Bernhard Schrader <bernhard.schrader@innogames.de>
2011-02-16 11:54 ` Re: LC_COLLATE and pg_upgrade Peter Eisentraut <peter_e@gmx.net>
2011-02-16 21:24 ` Re: LC_COLLATE and pg_upgrade Bruce Momjian <bruce@momjian.us>
0 siblings, 2 replies; 6+ messages in thread
From: Bernhard Schrader @ 2011-02-14 13:18 UTC (permalink / raw)
To: pgsql-admin
Am Donnerstag, den 10.02.2011, 17:56 +0100 schrieb Bernhard Schrader:
> Hi all,
>
> I just tried to pg_upgrade a PostgreSQL-8.4 to 9.0.
>
> pg_upgrade stopped with this message:
>
> "old and new cluster lc_collate values do not match"
>
> So i checked the LC_COLLATE on 8.4 and 9.0:
>
> 8.4:
> postgres=# show lc_collate;
> lc_collate
> ------------
> en_US.utf8
> (1 row)
>
> 9.0:
> postgres=# show lc_collate;
> lc_collate
> ------------
> en_US.UTF-8
> (1 row)
>
>
> Well... I think you see my problem, i don't even know if it is really a
> problem...
>
> Is it possible just to change the lc_collate on the 8.4 machine?
> Obviously its the same encoding, or am i wrong?
>
> My second Question, but not that urgent is about two databases which
> have LC_COLLATE=C, is there a safe way to get it to UTF-8?
>
> regards
> Bernhard
>
>
>
Doesn't anyone know if I could override this settings?
LC_COLLATE should be interesting for sort order, and while both is utf8,
it should work or am I totally wrong?
As far as I read right now, LC_COLLATE is a read_only variable which is
used while initdb. But why does the pg_upgrade script doesn't see that
utf8 and UTF-8 are the same? Is it just a string compare?
greetz
Bernhard
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: LC_COLLATE and pg_upgrade
2011-02-10 16:56 LC_COLLATE and pg_upgrade Bernhard Schrader <bernhard.schrader@innogames.de>
2011-02-14 13:18 ` Re: LC_COLLATE and pg_upgrade Bernhard Schrader <bernhard.schrader@innogames.de>
@ 2011-02-16 11:54 ` Peter Eisentraut <peter_e@gmx.net>
2011-02-16 12:14 ` Re: LC_COLLATE and pg_upgrade Bernhard Schrader <bernhard.schrader@innogames.de>
1 sibling, 1 reply; 6+ messages in thread
From: Peter Eisentraut @ 2011-02-16 11:54 UTC (permalink / raw)
To: Bernhard Schrader <bernhard.schrader@innogames.de>; +Cc: pgsql-admin
On mån, 2011-02-14 at 14:18 +0100, Bernhard Schrader wrote:
> As far as I read right now, LC_COLLATE is a read_only variable which
> is used while initdb. But why does the pg_upgrade script doesn't see
> that utf8 and UTF-8 are the same? Is it just a string compare?
Why don't you just reinitialize your new database cluster with the same
locale spelling as the old one?
Your points are valid, but unfortunately difficult to handle in the
general case.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: LC_COLLATE and pg_upgrade
2011-02-10 16:56 LC_COLLATE and pg_upgrade Bernhard Schrader <bernhard.schrader@innogames.de>
2011-02-14 13:18 ` Re: LC_COLLATE and pg_upgrade Bernhard Schrader <bernhard.schrader@innogames.de>
2011-02-16 11:54 ` Re: LC_COLLATE and pg_upgrade Peter Eisentraut <peter_e@gmx.net>
@ 2011-02-16 12:14 ` Bernhard Schrader <bernhard.schrader@innogames.de>
2011-02-16 13:06 ` Re: LC_COLLATE and pg_upgrade Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 6+ messages in thread
From: Bernhard Schrader @ 2011-02-16 12:14 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-admin
If i reinitialize the database cluster, won't i have to pg_dump restore
my data? In this case the downtime would be to big. Therefore I'm
searching for a faster way.
utf8 and UTF-8, should be the same in my opinion, so i think there must
be a way to just change this value, so that pg_upgrade can do his work,
or is this impossible?
regards
Am Mittwoch, den 16.02.2011, 13:54 +0200 schrieb Peter Eisentraut:
> On mån, 2011-02-14 at 14:18 +0100, Bernhard Schrader wrote:
> > As far as I read right now, LC_COLLATE is a read_only variable which
> > is used while initdb. But why does the pg_upgrade script doesn't see
> > that utf8 and UTF-8 are the same? Is it just a string compare?
>
> Why don't you just reinitialize your new database cluster with the same
> locale spelling as the old one?
>
> Your points are valid, but unfortunately difficult to handle in the
> general case.
>
>
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: LC_COLLATE and pg_upgrade
2011-02-10 16:56 LC_COLLATE and pg_upgrade Bernhard Schrader <bernhard.schrader@innogames.de>
2011-02-14 13:18 ` Re: LC_COLLATE and pg_upgrade Bernhard Schrader <bernhard.schrader@innogames.de>
2011-02-16 11:54 ` Re: LC_COLLATE and pg_upgrade Peter Eisentraut <peter_e@gmx.net>
2011-02-16 12:14 ` Re: LC_COLLATE and pg_upgrade Bernhard Schrader <bernhard.schrader@innogames.de>
@ 2011-02-16 13:06 ` Peter Eisentraut <peter_e@gmx.net>
0 siblings, 0 replies; 6+ messages in thread
From: Peter Eisentraut @ 2011-02-16 13:06 UTC (permalink / raw)
To: Bernhard Schrader <bernhard.schrader@innogames.de>; +Cc: pgsql-admin
On ons, 2011-02-16 at 13:14 +0100, Bernhard Schrader wrote:
> If i reinitialize the database cluster, won't i have to pg_dump restore
> my data? In this case the downtime would be to big. Therefore I'm
> searching for a faster way.
I said reinitialize your new database cluster. Since you're running
pg_upgrade, I assume your new cluster has no data in it worth keeping.
> utf8 and UTF-8, should be the same in my opinion, so i think there must
> be a way to just change this value, so that pg_upgrade can do his work,
> or is this impossible?
No, you can't change it with any reasonable effort. (You can manually
edit pg_control and recalculate the checksum, if you must. Don't do
that, though.)
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: LC_COLLATE and pg_upgrade
2011-02-10 16:56 LC_COLLATE and pg_upgrade Bernhard Schrader <bernhard.schrader@innogames.de>
2011-02-14 13:18 ` Re: LC_COLLATE and pg_upgrade Bernhard Schrader <bernhard.schrader@innogames.de>
@ 2011-02-16 21:24 ` Bruce Momjian <bruce@momjian.us>
1 sibling, 0 replies; 6+ messages in thread
From: Bruce Momjian @ 2011-02-16 21:24 UTC (permalink / raw)
To: Bernhard Schrader <bernhard.schrader@innogames.de>; +Cc: pgsql-admin
Bernhard Schrader wrote:
> Doesn't anyone know if I could override this settings?
> LC_COLLATE should be interesting for sort order, and while both is utf8,
> it should work or am I totally wrong?
>
> As far as I read right now, LC_COLLATE is a read_only variable which is
> used while initdb. But why does the pg_upgrade script doesn't see that
> utf8 and UTF-8 are the same? Is it just a string compare?
Yes, just a string compare.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2011-02-16 21:24 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10 16:56 LC_COLLATE and pg_upgrade Bernhard Schrader <bernhard.schrader@innogames.de>
2011-02-14 13:18 ` Bernhard Schrader <bernhard.schrader@innogames.de>
2011-02-16 11:54 ` Peter Eisentraut <peter_e@gmx.net>
2011-02-16 12:14 ` Bernhard Schrader <bernhard.schrader@innogames.de>
2011-02-16 13:06 ` Peter Eisentraut <peter_e@gmx.net>
2011-02-16 21:24 ` Bruce Momjian <bruce@momjian.us>
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