relhasindex(was RE: [HACKERS] Proposed Changes to PostgreSQL)

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers(at)postgreSQL(dot)org>, <pgsql-sql(at)postgreSQL(dot)org>, "Chris" <chris(at)bitmead(dot)com>
Subject: relhasindex(was RE: [HACKERS] Proposed Changes to PostgreSQL)
Date: 2000-02-04 00:16:46
Message-ID: 000201bf6ea5$1f8a9be0$2801007e@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-sql

> -----Original Message-----
> From: owner-pgsql-hackers(at)postgreSQL(dot)org
> [mailto:owner-pgsql-hackers(at)postgreSQL(dot)org]On Behalf Of Bruce Momjian
>
> > Bruce Momjian wrote:
> >
> > > > Well I see that pg_class has columns like "relhasindex". If
> we added a
> > > > "relhassubclass", the overhead should be unmeasureable.
> > >
> > > Yes, but how do you keep that accurate? If I add indexes, then drop
> > > them, does relhasindex go to false.
> >
> > I don't know. Does it?
>
> Let me add that to the TODO list.
>
> >
> > >Could you do that for relhassubclass?
> >
> > If we made it relnumsubclasses and incremented/decremented on
> > CREATE/DROP, it seems easy in theory.
>
> Yes, that would work. Seems hasindex has problems.
>

This posting may be off the point,sorry.

Isn't relhasindex a kind of item that we can live without it ?
I proposed to change the use of this item in [[HACKERS] Index
recreation in vacuum]. Though I have heard no clear objection,
I want to confirm again. My proposal is as follows.

1) DDL commands don't rely on relhasindex.
2) DML commands don't take indexes into account if
relhasindex is set to false.
3) REINDEX command and vacuum with REINDEX option
sets this flag to false at the beginning and sets it to true
when recreation of all indexes completed.

Comments ?

Regards.

Hiroshi Inoue
Inoue(at)tpf(dot)co(dot)jp

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ross J. Reedstrom 2000-02-04 00:28:47 Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL
Previous Message Chris Bitmead 2000-02-03 23:55:39 Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL

Browse pgsql-hackers by date

  From Date Subject
Next Message Ross J. Reedstrom 2000-02-04 00:28:47 Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL
Previous Message Chris Bitmead 2000-02-04 00:01:44 Re: [HACKERS] how to deal with sparse/to-be populated tables

Browse pgsql-sql by date

  From Date Subject
Next Message Ross J. Reedstrom 2000-02-04 00:28:47 Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL
Previous Message Chris Bitmead 2000-02-03 23:55:39 Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL