[PATCH] Resurrecting partial indicies, need help and feedback - Mailing list pgsql-general

From Martijn van Oosterhout
Subject [PATCH] Resurrecting partial indicies, need help and feedback
Date
Msg-id 20010703003041.A1047@svana.org
Whole thread Raw
List 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@svana.org>
http://svana.org/kleptog/
- Artificial Intelligence is the science of making computers that behave
- like the ones in the movies.

Attachment

pgsql-general by date:

Previous
From: Doug McNaught
Date:
Subject: Re: Compilation & Installation problem
Next
From: "Mihai Gheorghiu"
Date:
Subject: Re: Migrating from MSAccess