Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lo8yq-0005q5-Mx for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Jun 2021 18:19:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lo8yp-0006jW-C7 for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Jun 2021 18:19:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lo8yp-0006jO-4J for pgsql-hackers@lists.postgresql.org; Tue, 01 Jun 2021 18:19:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lo8ym-0000Ct-Vo for pgsql-hackers@lists.postgresql.org; Tue, 01 Jun 2021 18:19:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 151IJ13v2845637; Tue, 1 Jun 2021 14:19:02 -0400 From: Tom Lane To: Alexander Pyhalov cc: Amit Langote , PostgreSQL Hackers Subject: Re: join pushdown and issue with foreign update In-reply-to: <050b90460c024dd21af53dbaaf8fd510@postgrespro.ru> References: <7817fb9ebd6661cdf9b67dec6e129a78@postgrespro.ru> <050b90460c024dd21af53dbaaf8fd510@postgrespro.ru> Comments: In-reply-to Alexander Pyhalov message dated "Tue, 01 Jun 2021 19:00:55 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2845635.1622571541.1@sss.pgh.pa.us> Date: Tue, 01 Jun 2021 14:19:01 -0400 Message-ID: <2845636.1622571541@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alexander Pyhalov writes: > What about the following patch? ISTM that using a specific rowtype rather than RECORD would be quite disastrous from the standpoint of bloating the number of distinct resjunk columns we need for a partition tree with a lot of children. Maybe we'll have to go that way, but it seems like an absolute last resort. I think a preferable fix involves making sure that the correct record-type typmod is propagated to record_in in this context. Alternatively, maybe we could insert the foreign table's rowtype during execution of the input operation, without touching the plan as such. Could we start by creating a test case that doesn't involve uncommittable hacks to the source code? regards, tom lane