[PATCH] Resurrecting partial indicies, need help and feedback

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: [PATCH] Resurrecting partial indicies, need help and feedback
Date: 2001-07-02 14:30:41
Message-ID: 20010703003041.A1047@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Attached is a patch (all 59 lines of it) that fixes some of the issues with
partial indicies. The things I've done so far are:

* Add the grammer back into the .y files
* Add the table to the namespace where the expression is checked in
* Fix the expression evaluation code in btbuild to not segfault

You can now create partial indicies though they don't work very well yet.

It would be nice if some people could look over this patch and tell me if
I've done anything stupid. I've mostly guessed how it works so far.

Current issues:

* Right now the planner segfaults when checking expressions involving the
partial index expression. Havn't looked into this much yet.

* When you do a vacuum, you get the 'TUPLES NOT SAME AS HEAP' message. I
don't know what to do about this, since the whole point of a partial index
is to have significantly less tuples. The vacuum itself works fine.

* When you insert a new tuple into the table, it (i'm pretty sure) gets
inserted into the table whether or not it matches the expression. Could
someone confirm this and tell me whether the insert function can do the
checking without making a context or using slots? There's no HeapTuple
either.

Also, all the other index types need to be fixed aswell...

Should vacuum check that all the tuples in the index still match the
expression?

Thanks in advance,

--
Martijn van Oosterhout <kleptog(at)svana(dot)org>
http://svana.org/kleptog/
- Artificial Intelligence is the science of making computers that behave
- like the ones in the movies.

Attachment Content-Type Size
postgres.patch text/plain 2.2 KB

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-07-02 14:52:33 Re: 7.1 docs -- "create table"?
Previous Message Mihai Gheorghiu 2001-07-02 14:25:42 Re: Migrating from MSAccess