Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iCviV-0004vJ-Qd for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Sep 2019 01:03:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iCviS-00078t-NV for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Sep 2019 01:03:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iCviS-00078m-4u for pgsql-hackers@lists.postgresql.org; Wed, 25 Sep 2019 01:03:36 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iCviP-0003nP-QZ for pgsql-hackers@postgresql.org; Wed, 25 Sep 2019 01:03:34 +0000 Received: by mail-pf1-x442.google.com with SMTP id h195so2337693pfe.5 for ; Tue, 24 Sep 2019 18:03:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:to:cc:subject:from:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=BRTeNRNSbA7LDuuUjfD6oca5lyXwnxnQpMqR1TOjV5w=; b=JbgVEgqvyhIDOfSHZ5/ZDgB3MxADBQa20D0oJ7lUBzBfbfKLDtUHbcVdZftZNC7fet bjyBS2tD4QpQcQ2rApLvAt9Q7dbmgAPHSL6JpdWZt2//0C53DhRHUQLIrotFyBl+dwsK UBu3ur6YKTl0dvL2MgGbipxilOEgAAPYiRKs7xYCBJmTA9RWvFESh2bY/lLoqcuBod6e tsaQ6+1c/4q2v0BUwrPdjhpw+Fql3LvMfyWYOADWI5RK8FhTjfaJhWc8F47m1KVh9CfF kUd7A2W+PhJF0jxYhkS8Ve1qVdl72DbHQrR+2zGPbMs5UReLNMDF4bGYvJirUECGa65X bGBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:to:cc:subject:from:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=BRTeNRNSbA7LDuuUjfD6oca5lyXwnxnQpMqR1TOjV5w=; b=BtUHiUkyqdpTglkI1Gk3DFmmFjFRQhLDRWDRU/BMy6TSPlbL5+tbK1Bl58fRbR50Ep dejCZbeZpUUcPUYRkSBzZ7dBfloJKURTJa3vs+IwO7aK82cnoy6r9gSyFnzeBMWs9G78 sV72WWKqjl9XaumRo75aDC2W68aB6vc2nzbK4ofZIyYDP2ULBxbMYLEVfUeD7Na8hNmP R/VhEOkNqzq2fC1GV7/iyjlizGr5Okr48vCCloPSEG0kwj2cDtUxoiJuMX4w2xtdgVVR jEva8KTnxhdaDCIAEUqwocOv7GttUHugN5se7p6LA5SnQ0a4hgmfHKPb9qMe+yYWxEJx KiGQ== X-Gm-Message-State: APjAAAXhWVb5MBxuC/oShQUs43AGpEmKy2Y46dxt4n0yW75y7RvboSnC jGqd65Zh4+q5bXWPcbFf0GQ= X-Google-Smtp-Source: APXvYqyKhx7C1QgVi74bohjzY9Dv7CB6toctWGdz+UObVvEH/OwvWMkJhjHlS8UCJRdDSy5yOWy4gw== X-Received: by 2002:a62:e106:: with SMTP id q6mr6577826pfh.14.1569373412488; Tue, 24 Sep 2019 18:03:32 -0700 (PDT) Received: from localhost (w204177.dynamic.ppp.asahi-net.or.jp. [121.1.204.177]) by smtp.gmail.com with ESMTPSA id b5sm2833919pgb.68.2019.09.24.18.03.24 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 24 Sep 2019 18:03:31 -0700 (PDT) Date: Wed, 25 Sep 2019 10:03:01 +0900 (Tokyo Standard Time) Message-Id: <20190925.100301.198068449.horikyota.ntt@gmail.com> To: alvherre@2ndquadrant.com Cc: 9erthalion6@gmail.com, florisvannee@optiver.com, jesper.pedersen@redhat.com, david.rowley@2ndquadrant.com, thomas.munro@gmail.com, jtc331@gmail.com, rafia.pghackers@gmail.com, jeff.janes@gmail.com, pg@bowt.ie, tomas.vondra@2ndquadrant.com, thomas.munro@enterprisedb.com, bhushan.uparkar@gmail.com, pgsql-hackers@postgresql.org, a.korotkov@postgrespro.ru Subject: Re: Index Skip Scan From: Kyotaro Horiguchi In-Reply-To: <20190924120627.GA12454@alvherre.pgsql> References: <20190924.174146.159197618.horikyota.ntt@gmail.com> <20190924120627.GA12454@alvherre.pgsql> User-Agent: Mew version 6.5 on Emacs 22.2 / Mule 5.0 =?iso-2022-jp?B?KBskQjpnGyhCKQ==?= / Meadow-3.01-dev (TSUBO-SUMIRE) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk At Tue, 24 Sep 2019 09:06:27 -0300, Alvaro Herrera wrote in <20190924120627.GA12454@alvherre.pgsql> > On 2019-Sep-24, Kyotaro Horiguchi wrote: > > > Sorry, it's not a boolean. A tristate value. From the definition > > (Back, NoMove, Forward) = (-1, 0, 1), (dir1 == -dir2) if > > NoMovement did not exist. If it is not guranteed, > > > > (dir1 != 0 && dir1 == -dir2) ? > > Maybe just add ScanDirectionIsOpposite(dir1, dir2) with that > definition? :-) Yeah, sounds good to establish it as a part of ScanDirection's definition. regards. -- Kyotaro Horiguchi NTT Open Source Software Center