Re: Some 8.4 changes needed according to pg_migrator testing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Some 8.4 changes needed according to pg_migrator testing
Date: 2009-05-08 18:39:42
Message-ID: 11807.1241807982@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Heikki Linnakangas wrote:
>> If we go with that, we should probably make the notion of a default
>> collation explicit. We could set pg_database.datcollate/datctype column
>> to NULL to mean "use the cluster default".

> I'm not sure how this would work. If I initdb with a certain
> locale/encoding and then create a database with default locale/encoding,
> how would a restore work on a cluster that has been initdb'd with a
> different locale/encoding? If you don't dump the locale specification,
> it could very well not match what the user intended.

As Peter suggested, that's more or less the point. As long as we still
have pg_dump output include the client_encoding setting, it is sensible
to try to load a dump into a different default database encoding/locale;
and in fact you can not guarantee that the new platform's locales behave
exactly the same anyway.

One problem that just occurred to me is that this solution may not be
adequate for pg_migrator. It will need to check that the new database
has the same "default" settings (where "default" means "those of
template0") as the old installation did. I think that's probably doable
but we'll have to check.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2009-05-08 18:45:57 Re: Patch to fix search_path defencies with pg_bench
Previous Message Alvaro Herrera 2009-05-08 18:30:17 Re: Some 8.4 changes needed according to pg_migrator testing