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 1hlE5J-0004Av-27 for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Jul 2019 15:00:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hlE5H-00064E-P6 for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Jul 2019 15:00:39 +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 1hlE5H-00062Z-BF for pgsql-hackers@lists.postgresql.org; Wed, 10 Jul 2019 15:00:39 +0000 Received: from smtp03.optiver.com ([195.246.114.70]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlE5F-00043k-2V for pgsql-hackers@postgresql.org; Wed, 10 Jul 2019 15:00:38 +0000 Received: from pps.filterd (smtp03.optiver.com [127.0.0.1]) by smtp03.optiver.com (8.16.0.27/8.16.0.27) with SMTP id x6AEq8OB025268; Wed, 10 Jul 2019 17:00:24 +0200 Received: from opammb0562.comp.optiver.com (opammb0562.comp.optiver.com [10.131.160.2]) by smtp03.optiver.com with ESMTP id 2tjh85t7hr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 10 Jul 2019 17:00:24 +0200 Received: from opammb0561.comp.optiver.com (10.131.160.1) by opammb0562.comp.optiver.com (10.131.160.2) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 10 Jul 2019 17:00:24 +0200 Received: from opammb0561.comp.optiver.com ([fe80::9d46:f4ee:846a:2858]) by opammb0561.comp.optiver.com ([fe80::9d46:f4ee:846a:2858%17]) with mapi id 15.00.1473.003; Wed, 10 Jul 2019 17:00:24 +0200 From: Floris Van Nee To: Dmitry Dolgov <9erthalion6@gmail.com>, David Rowley , Jesper Pedersen CC: Thomas Munro , James Coleman , Rafia Sabih , Jeff Janes , Peter Geoghegan , Tomas Vondra , Thomas Munro , Bhushan Uparkar , PostgreSQL-development , Alexander Korotkov Subject: Re: Index Skip Scan Thread-Topic: Index Skip Scan Thread-Index: AQHVNzAzqOV3zlRPpkaqwSQeCIqflA== Date: Wed, 10 Jul 2019 15:00:23 +0000 Message-ID: <1562770824851.93603@Optiver.com> References: <2685f020-f302-9bf6-1b5c-ebc2bcebc635@2ndquadrant.com> <1559361698401.22864@Optiver.com> <1559362223126.18661@Optiver.com> <988b7763-5c55-1be1-b7b6-f3a68eff0d40@redhat.com> <1559763453006.85615@Optiver.com> <1559763570329.85227@Optiver.com> <4d469bf2-49ff-bc3d-a428-6c7b5d87d526@redhat.com> <1562769595280.16860@Optiver.com>,,<1562770342222.94509@Optiver.com> In-Reply-To: <1562770342222.94509@Optiver.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.131.160.182] x-tm-as-product-ver: SMEX-11.0.0.1284-8.100.1062-24750.007 x-tm-as-result: No--3.151100-0.000000-31 x-tm-as-user-approved-sender: Yes x-tm-as-user-blocked-sender: No Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-07-10_06:,, signatures=0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =0A= > Thanks for testing! Could you provide a test case to show what exactly is= the=0A= > problem?=0A= =0A= Note that in the case of a regular non-skip scan, this cursor backwards wor= ks because the Unique node on top does not support backwards scanning at al= l. Therefore, when creating the cursor, the actual plan actually contains a= Materialize node on top of the Unique+Index Scan nodes. The 'fetch backwar= ds' never reaches the the index scan therefore, as it just fetches stuff fr= om the materialize node.=0A= =0A= -Floris=