Need for re-index after pg_upgrade

Started by Andreas Joseph Kroghalmost 11 years ago4 messagesgeneral
Jump to latest
#1Andreas Joseph Krogh
andreas@visena.com

Hi all.
 
In the man-page for pg_upgrade we see this:
pg_upgrade will require a reindex if:

* an index is of type hash or GIN

 
A bit further up we see:
All failure, rebuild, and reindex cases will be reported by pg_upgrade if they
affect your installation; post-upgrade scripts to rebuild tables and indexes
will be generated automatically.
 
I have several GIN-indexes and upgraded from 9.3 to 9.4 but no re-index
scripts were generated. Does this mean there's no need to rebuild the indexes
or just that I have to do it manually?
 
Thanks.
 
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas@visena.com <mailto:andreas@visena.com>
www.visena.com <https://www.visena.com&gt;
<https://www.visena.com&gt;

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andreas Joseph Krogh (#1)
Re: Need for re-index after pg_upgrade

Andreas Joseph Krogh <andreas@visena.com> writes:

In the man-page for pg_upgrade we see this:
pg_upgrade will require a reindex if:
* an index is of type hash or GIN

I think that probably refers to some version-specific upgrade
situations; I can't see a reason why it would be true in general.
Bruce, doesn't that doc need improvement?

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Andreas Joseph Krogh
andreas@visena.com
In reply to: Tom Lane (#2)
Re: Need for re-index after pg_upgrade

På mandag 29. juni 2015 kl. 15:42:22, skrev Tom Lane <tgl@sss.pgh.pa.us
<mailto:tgl@sss.pgh.pa.us>>:
Andreas Joseph Krogh <andreas@visena.com> writes:

In the man-page for pg_upgrade we see this:
pg_upgrade will require a reindex if:
  * an index is of type hash or GIN

I think that probably refers to some version-specific upgrade
situations; I can't see a reason why it would be true in general.
Bruce, doesn't that doc need improvement?

regards, tom lane
 
I'm specifically thinking about this (from 9.4 release-notes):
E.5.3.1.1. Indexes <>

* Reduce GIN <http://www.postgresql.org/docs/9.4/static/gin.html&gt; index size
(Alexander Korotkov, Heikki Linnakangas)

Indexes upgraded via pg_upgrade
<http://www.postgresql.org/docs/9.4/static/pgupgrade.html&gt; will work fine but
will still be in the old, largerGIN format. Use REINDEX
<http://www.postgresql.org/docs/9.4/static/sql-reindex.html&gt; to recreate old
GIN indexes in the new format.

 
It'd be great if pg_upgrade generated re-index scripts to make those indexes
use the new format.
 
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas@visena.com <mailto:andreas@visena.com>
www.visena.com <https://www.visena.com&gt;
<https://www.visena.com&gt;

 

#4Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Tom Lane (#2)
Re: Need for re-index after pg_upgrade

On 06/29/2015 06:42 AM, Tom Lane wrote:

Andreas Joseph Krogh <andreas@visena.com> writes:

In the man-page for pg_upgrade we see this:
pg_upgrade will require a reindex if:
* an index is of type hash or GIN

I think that probably refers to some version-specific upgrade
situations; I can't see a reason why it would be true in general.
Bruce, doesn't that doc need improvement?

Yes for coming from 8.3:

http://www.postgresql.org/docs/9.4/static/pgupgrade.html

Limitations in Upgrading from PostgreSQL 8.3
....

pg_upgrade will require a reindex if:

an index is of type hash or GIN

an index uses bpchar_pattern_ops

This how it shows up my 9.4 man file also.

regards, tom lane

--
Adrian Klaver
adrian.klaver@aklaver.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general