Re: Found a bug

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com>
Cc: "PGSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Found a bug
Date: 2006-11-07 14:50:49
Message-ID: 9781.1162911049@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com> writes:
> Please refer the following session snippet. It seems that creating and
> dropping an index on a table, within a transaction, leaves the table marked
> as having an index.

This isn't a bug. Refer to catalogs.sgml:

relhasindex
True if this is a table and it has (or recently had) any indexes.
This is set by CREATE INDEX, but not cleared immediately by DROP
INDEX. VACUUM clears relhasindex if it finds the table has no indexes.

The flag is only used as a hint that it's worth looking in pg_index to
see what rows there are for the table.

As for "tracking it down", read index_drop().

regards, tom lane

In response to

  • Found a bug at 2006-11-07 13:55:59 from Gurjeet Singh

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gurjeet Singh 2006-11-07 16:01:41 Re: Found a bug
Previous Message Richard Huxton 2006-11-07 14:04:16 Re: Found a bug