Re: BUG #4238: pg_class.relhasindex not updated by vacuum - Mailing list pgsql-bugs

From Lawrence Cohan
Subject Re: BUG #4238: pg_class.relhasindex not updated by vacuum
Date
Msg-id D125F8AF679AEE4390F3A546AFFA5CB00331A3DC@hermes.1shoppingcart.lan
Whole thread Raw
In response to Re: BUG #4238: pg_class.relhasindex not updated by vacuum  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-bugs
Many thanks again. I figured out how to get only the tables that have
indexes created less these PK indexes so I can used the pg_get_indexdef
to rebuild them all through a scheduled Pgagent job in a loop using
CONCURRENTLY as our production assumes DB access 24/7.

Lawrence Cohan.

-----Original Message-----
From: Alvaro Herrera [mailto:alvherre@commandprompt.com]=20
Sent: Friday, June 13, 2008 12:57 PM
To: Lawrence Cohan
Cc: Tom Lane; pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #4238: pg_class.relhasindex not updated by
vacuum

Lawrence Cohan wrote:
> Isn't a PK a CONSTRAINT and not an INDEX???

Sure, from a logical point of view.  The implementation of that
constraint is an index.

> In that case the two separate pg_class relhasindex and relhaspkey
would
> make sense indeed - just a thought nothing else and we'll take it as
is.

What would be the point?  If you want to figure out whether a table has
a primary key, you can query the catalogs.

--=20
Alvaro Herrera
http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #4238: pg_class.relhasindex not updated by vacuum
Next
From: "Lawrence Cohan"
Date:
Subject: Re: BUG #4238: pg_class.relhasindex not updated by vacuum