Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eo4bd-0000MB-3I for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Feb 2018 09:53:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eo4bb-00060H-Vg for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Feb 2018 09:52:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eo4bb-000607-Ge for pgsql-hackers@lists.postgresql.org; Tue, 20 Feb 2018 09:52:59 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eo4bY-0000CP-2M for pgsql-hackers@postgresql.org; Tue, 20 Feb 2018 09:52:58 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 7680B21C232D; Tue, 20 Feb 2018 12:52:53 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from localhost (gw.postgrespro.ru [93.174.131.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 2046C21C232B; Tue, 20 Feb 2018 12:52:53 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1519120373; bh=J3a1R5IrClxRh1D69qKDeG2JQUD0zscaN0AKG6H5p9U=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=R2Q17lC8b3Yo5qu5a7U6/NMNaFEyJD91duW0Ku0nBEoLt8RCXcx/2phIJQDBiO9CI dc430QE/ogVID7npDfjOoZojdd3d7ofm5nR6D3olbJlzasmGw/VwpI8Z8L2grvSUKB +w4hQYSoBc6yKXIGH0iwLN2SPWz0ZmC6nR21VCh8= Date: Tue, 20 Feb 2018 12:52:53 +0300 From: Aleksander Alekseev To: Anastasia Lubennikova Cc: Tom Lane , Yugo Nagata , pgsql-hackers@postgresql.org Subject: Re: CURRENT OF causes an error when IndexOnlyScan is used Message-ID: <20180220095252.GA18315@e733.localdomain> References: <20180201013349.937dfc5f.nagata@sraoss.co.jp> <20180201014444.f78358df.nagata@sraoss.co.jp> <22958.1517451171@sss.pgh.pa.us> <97dc81d3-0ea9-3032-49d9-7983e35fb010@postgrespro.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sdtB3X0nJg68CQEu" Content-Disposition: inline In-Reply-To: <97dc81d3-0ea9-3032-49d9-7983e35fb010@postgrespro.ru> User-Agent: Mutt/1.9.3 (2018-01-21) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Anastasia, > I'd like to propose the patch that fixes the issue. > We already have a way to return heaptuple from IndexOnlyScan, > but it was not applied to b-tree for some reason. >=20 > Attached patch solves the reported bug. > Moreover, it will come in handy for "index with included attributes" feat= ure > [1], > where we can store long (and even TOASTed) attributes in indextuple. >=20 > [1] https://commitfest.postgresql.org/17/1350/ I believe the patch should include a test that tries to reproduce an issue it tries to fix. Also maybe this code that repeats 3 times can be moved to a separate procedure? --=20 Best regards, Aleksander Alekseev --sdtB3X0nJg68CQEu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEECAokn0QZCoIHW4GpEEnCBLXCDtYFAlqL7/IACgkQEEnCBLXC DtYeFBAAxXfvxW7d8p3fK/UxXQ4SXZPoY2HJT2cNwMz+6ZO0ooTWf+SR9J3ZUuLq Mt5kMKmwvjRBS064PyouSMMueO2xxuka/4LAFIzFWS+UoWCs8N6PFH0tj20vy7Gb vJvZpxqX/tjxrCXFNhF00OZ8+t1gPX4w6enXw3uacxjieLH8tVJguNvi8pXnogWy b43CYw1UpEp74vlH4keiSCJ1U37Is74jrbD/rNj2GWoG6U5jnuwu3KD53PyfpHBp yUYnBuxv60GLCPaQAHL4hVUnxSGgZOxHU8J0KnqsSfncRTn19B6ebFPK3FBjaA7p yXx1QCSzUJxamomH3A3IIiPj7BwIK9UNXYIwdl04XW0oNleu1oWFPBw7hPAB4+/+ EmMxI8mKFxPE7BemWDrGZ74jFZoAvT4Eh+ycLc9AfInV6E5vRU0tFvg8HoBlAYJD EVHG3aCa233fFnA6laXAW9iCcG4rEYRAuIOHe5qTAowZyUtU22j1dZOeaYfTkGET +6mnp7PfaZs/VUSHq5hXRzg7/5wLcSeqwvRYV73OAN5SybCiKq/VCMIWJgvk0t72 sIPmqEYy6U+u7BN6LVqFOUOSt+dVSNtSs95X7DtX2X59ElTNBPZ/8dbtYJPImlb1 DvpBE4rN5CJYA0CtTfrOQrGizkOkxVqbIxeaR/XvFZYRl6qAxlQ= =43/0 -----END PGP SIGNATURE----- --sdtB3X0nJg68CQEu--