Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cyLHt-00064F-Hf for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Apr 2017 16:38:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cyLHt-0001tC-1w for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Apr 2017 16:38:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cyLHs-0001r3-2o for pgsql-hackers@postgresql.org; Wed, 12 Apr 2017 16:38:32 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cyLHn-0005Pr-AW for pgsql-hackers@postgresql.org; Wed, 12 Apr 2017 16:38:31 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 75CB421C27F3; Wed, 12 Apr 2017 19:38:25 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru From: Dmitry Ivanov To: Tom Lane Cc: Dmitry Ivanov , pgsql-hackers Subject: Re: Possible problem in Custom Scan API Date: Wed, 12 Apr 2017 19:37:57 +0300 MIME-Version: 1.0 Message-ID: In-Reply-To: <8130.1492013026@sss.pgh.pa.us> References: <20021.1491933424@sss.pgh.pa.us> <1ef85b46-1385-4810-bb80-97cd977da1d5@postgrespro.ru> <367.1491940070@sss.pgh.pa.us> <4509.1491944329@sss.pgh.pa.us> <0e0388a6-aa53-42a6-8be9-0d46ccbc788e@postgrespro.ru> <8130.1492013026@sss.pgh.pa.us> Organization: Postgres Professional User-Agent: Trojita/0.7; Qt/5.8.0; xcb; Linux; Content-Type: multipart/mixed; boundary="trojita=_7924a6b2-9c7f-41a0-99b8-dfd5d06ed70d" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org This is a multipart/mixed message in MIME format. --trojita=_7924a6b2-9c7f-41a0-99b8-dfd5d06ed70d Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Tom Lane wrote: > I'm coming around to the idea that it'd be better to disable physical > tlists for custom scans. I've been thinking about this all along, and it seems that this is a decent= =20 decision. However, I've made a tiny bugfix patch which allows CustomScans=20 to notify the core code that they can handle physical targetlists.=20 Extension authors won't have to change anything provided that CustomPath is= =20 allocated using palloc0(). > However, I'm hesitant to make such a change in the back branches; if > there's anyone using custom scans who's negatively affected, they'd be > rightfully unhappy. Are you satisfied if we change this in HEAD? It's kind of bittersweet. I'm really glad that you've changed your mind and= =20 this is going to be fixed in HEAD, but this change is crucial for our=20 extension (if we use it with vanilla postgres). Maybe you'll like my patch more. --=20 Dmitry Ivanov Postgres Professional: http://www.postgrespro.com Russian Postgres Company= --trojita=_7924a6b2-9c7f-41a0-99b8-dfd5d06ed70d Content-Type: text/x-patch Content-Disposition: attachment; filename=customscan_physical_tlist_fix.diff Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3NyYy9iYWNrZW5kL29wdGltaXplci9wbGFuL2NyZWF0 ZXBsYW4uYyBiL3NyYy9iYWNrZW5kL29wdGltaXplci9wbGFuL2NyZWF0ZXBs YW4uYwppbmRleCA3MTY3OGQwOGRjLi40YjAzMjI1MzBiIDEwMDY0NAotLS0g YS9zcmMvYmFja2VuZC9vcHRpbWl6ZXIvcGxhbi9jcmVhdGVwbGFuLmMKKysr IGIvc3JjL2JhY2tlbmQvb3B0aW1pemVyL3BsYW4vY3JlYXRlcGxhbi5jCkBA IC03NjEsNiArNzYxLDkgQEAgdXNlX3BoeXNpY2FsX3RsaXN0KFBsYW5uZXJJ bmZvICpyb290LCBQY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f-41a0-99b8-dfd5d06ed70d Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers --trojita=_7924a6b2-9c7f-41a0-99b8-dfd5d06ed70d--