Re: [PATCHES] GIN improvements

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Teodor Sigaev <teodor@sigaev.ru>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2008-07-24T18:29:58Z
Lists: pgsql-hackers
Teodor Sigaev <teodor@sigaev.ru> writes:
>> operations such as page splits.  Do we need to change the planner to
>> assume that this only works nicely for btree?

> It seems to that direction (backward or forward) has meaning only for
> indexes with amcanorder = true. With amcanorder=false results will be
> occasionally for any direction.

Well, no; amcanorder specifies that the index can return results that
are sorted according to some externally meaningful ordering.  The
question at hand is just whether the results of a single indexscan
are self-consistent.  That's a property that can reasonably be expected
to hold regardless of amcanorder; it does hold for hash indexes for
instance.  (In the case of hash we have to forbid splitting a bucket
that's actively being scanned in order to make it true.)

			regards, tom lane