Re: Changing collate & ctype for an existing database

From: rihad <rihad(at)mail(dot)ru>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Changing collate & ctype for an existing database
Date: 2017-07-11 05:10:41
Message-ID: 5f424d7d-bd1d-d3b3-91fa-4b59a3308528@mail.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 07/11/2017 12:45 AM, Tom Lane wrote:
> rihad <rihad(at)mail(dot)ru> writes:
>> On 07/10/2017 11:07 PM, Tom Lane wrote:
>>> ... which that isn't. I'd suggest checking for indexes that might need
>>> to be rebuilt with this query borrowed from the regression tests:
>> I ran the query on our production database. Zero results.
> Really? You have no indexes on textual columns? That seems surprising.
Oops, of course we do, around 10-15 per db. I was initially connected to
the postgres database when I ran the query, I thought the query you gave
me was global by looking at it.

So, deciding NOT to reindex all of them risks the corruption of their
relevant tables?
It could be easier to simply drop and restore the db, albeit with some
downtime.
Thank you so much for you help.

>> Do I have the green light to
>> set datcollate='en_US.UTF-8', datctype='en_US.UTF-8'
> Well, I'd double-check that result, but I suppose you can always reindex
> later if you find you missed something.
>
> regards, tom lane
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Farber 2017-07-11 05:48:42 Re: How to handle simultaneous FOR-IN UPDATE-RETURNING loops?
Previous Message Stephen Frost 2017-07-10 22:59:27 Re: pg_start/stop_backup non-exclusive scripts to snapshot