Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id DF52D6502EC for ; Thu, 24 Jul 2008 15:30:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 52386-02 for ; Thu, 24 Jul 2008 15:29:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 7C5A5650217 for ; Thu, 24 Jul 2008 15:29:59 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m6OITwjr009143; Thu, 24 Jul 2008 14:29:58 -0400 (EDT) To: Teodor Sigaev cc: Pgsql Hackers Subject: Re: [PATCHES] GIN improvements In-reply-to: <4888C90B.3020704@sigaev.ru> References: <483FD205.4090904@sigaev.ru> <486BC501.6060605@sigaev.ru> <27880.1215810535@sss.pgh.pa.us> <487A6E0C.3090600@sigaev.ru> <8993.1216843701@sss.pgh.pa.us> <4888A594.6010102@sigaev.ru> <7913.1216918895@sss.pgh.pa.us> <8177.1216920042@sss.pgh.pa.us> <4888C90B.3020704@sigaev.ru> Comments: In-reply-to Teodor Sigaev message dated "Thu, 24 Jul 2008 22:25:15 +0400" Date: Thu, 24 Jul 2008 14:29:58 -0400 Message-ID: <9142.1216924198@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/1145 X-Sequence-Number: 121405 Teodor Sigaev 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