Re: PITR Recovery and out-of-sync indexes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PITR Recovery and out-of-sync indexes
Дата
Msg-id 29475.1191436328@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: PITR Recovery and out-of-sync indexes  (Brian Wipf <brian@clickspace.com>)
Ответы Re: PITR Recovery and out-of-sync indexes  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
Brian Wipf <brian@clickspace.com> writes:
> PG tried to enforce the same LC_COLLATE and LC_CTYPE. On OS X, the
> value of en_US.utf8 didn't exist, so I created a soft link to
> en_US.UTF-8 in the /usr/share/locale/ directory. When I sort the
> values of product_id_from_source on both systems using the locales in
> this manner I get different orderings:

Hmph, hadn't remembered that, but indeed it seems that en_US sorting
is ASCII order, or nearly so, on Darwin.  On Linux it's "dictionary
order", which means case-insensitive, spaces are second class citizens,
and some other strange rules.

Linux:

$ LANG=en_US.utf8 sort zzz
ZZ538264
zz barf
zzdangle
zz echo
ZZring
$

Darwin, same data:

$ LANG=en_US.UTF-8 sort zzz
ZZ538264
ZZring
zz barf
zz echo
zzdangle
$

> I can happily live with rebuilding indexes if this is the only
> problem I can expect to encounter, and I would still prefer PITR over
> replication.

The whole notion scares the daylights out of me.  If you really need
to use PITR between these two particular platforms, use a locale
with common behavior --- C/POSIX would work.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Erik Jones
Дата:
Сообщение: Re: Generating TRUNCATE orders
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PITR and Compressed WALS