From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: gnanam@zoniac.com
To: pgsql-admin@postgresql.org
Subject: Re: How to find and/or REINDEX only GiST indexes in the database?
Date: Wed, 12 Oct 2011 17:07:05 +0300
Message-ID: <201110121707.05850.achill@matrix.gatewaynet.com> (raw)
In-Reply-To: <008201cc88dd$0208c1a0$061a44e0$@com>
References: <008201cc88dd$0208c1a0$061a44e0$@com>
Στις Wednesday 12 October 2011 15:46:45 ο/η Gnanakumar έγραψε:
> Hi,
>
> We're planning to upgrade our Production server from PostgreSQL v8.2.3 to
> the latest version in 8.2 series, that is v8.2.22.
>
> In 8.2.11 Release Notes here
> http://www.postgresql.org/docs/current/interactive/release-8-2-11.html, it's
> been mentioned that:
> "Also, if you were running a previous 8.2.X release, it is recommended to
> REINDEX all GiST indexes after the upgrade."
>
> My question is, how do I find out or REINDEX *only* GiST indexes in the
> database? Is there a single syntax/command that does this?
I guess not, one way is to take an ascii schema-only dump and parse it,
looking for GIST indexes.
Anotherway is to look in those tables:
SELECT oid,* from pg_opclass ; -- to find the GIST class
SELECT c.relname,indclass from pg_catalog.pg_index i,pg_catalog.pg_class c where indexrelid=c.oid;
^^ to find those indexes which have this gist class oid in the indclass field.
Note tho, that indclass is oidvector, and i dont know how you could iterate on those (by SQL),
without writing a C (or other) program.
>
> Regards,
> Gnanam
>
>
>
--
Achilleas Mantzios
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: achill@matrix.gatewaynet.com, gnanam@zoniac.com
Subject: Re: How to find and/or REINDEX only GiST indexes in the database?
In-Reply-To: <201110121707.05850.achill@matrix.gatewaynet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox