Re: Default collation changes leave indexes in invalid state

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Vincent Van Driessche <vincent(at)dabble(dot)be>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Default collation changes leave indexes in invalid state
Date: 2019-09-11 15:22:29
Message-ID: 20190911152229.GA24006@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2019-Sep-11, Vincent Van Driessche wrote:

> If I understand it correctly you are saying: “If you run queries like this, you’d better know what you are doing”?
> Is there a more supported way to change the default collation on PostgreSQL?

I don't think there's a supported way to change the default collation on
an existing database. You would have to dump and restore in order to
achieve that cleanly. That would be my advice.

Part of the reason that there isn't a way to do this is that it isn't a
trivial change such as a single catalog update. If you want to use this
hack, fine -- it's your database. However, as you noticed, you will
also have to reindex many indexes (which? it's up to you to find out),
and there likely are other changes that you need to do.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2019-09-11 15:47:07 Re: BUG #15804: Assertion failure when using logging_collector with EXEC_BACKEND
Previous Message Vincent Van Driessche 2019-09-11 14:07:07 Re: Default collation changes leave indexes in invalid state