Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sgLQJ-000xI6-Vf for pgsql-bugs@arkaria.postgresql.org; Tue, 20 Aug 2024 09:45:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sgLPI-00DWWR-4H for pgsql-bugs@arkaria.postgresql.org; Tue, 20 Aug 2024 09:44:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sgLPH-00DWVB-Q1 for pgsql-bugs@lists.postgresql.org; Tue, 20 Aug 2024 09:44:04 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sgLPF-000XwB-Q0 for pgsql-bugs@lists.postgresql.org; Tue, 20 Aug 2024 09:44:03 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-428119da952so42469455e9.0 for ; Tue, 20 Aug 2024 02:44:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724147040; x=1724751840; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=Kxw0bjXWHxH77jqNNBEwzrdUf6KsPLUHZzBwCtlJxYY=; b=M9jQmgJj9y/CNSMViiexOAvbYQtrSeKqo79OaFVP0/Ey1iIy3yki7/REPkijA82W9K YJQwzZYRNw4yThdvHVLVMzNw1mq8U0BZOz0tIR77fChGCpp+CH+jP2QpRswrG1njtIHb nEGiJ+O3RS24wR9zvg77AXf9G+bpPE57UzaMjKv+D0Lz+R6agBoyb6ig3/ufmcnGxaiv c4bD6SLH4xcnYpxMDo0u8fV6dOQROL194ayhmJwiyP8KruNwhdhV/g6EI6Cg2s7maagW wZXBF3h7ywOHu7CvHJHX6SaS0OVpvVCVeZ+Xe2UAmJBruuwAcNvZan15mP9WJ/bV2PRW 1l5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724147040; x=1724751840; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Kxw0bjXWHxH77jqNNBEwzrdUf6KsPLUHZzBwCtlJxYY=; b=DiIgkuWBAcO23Pqk6Tp8xQxODNrKdmWoxUeBD5/EPX0xwnU2TvUuDcyVH3KAGfJuMr oA+X4q6/8P7Sx+n+wu/vmWoZ2Da3birly3O6snCMlsH4bkTfJWTR2caJkAU/72NGhKSA sw5kuqwO8zyx7DUoFrNDTB/+8JWP1VVpMsPfsJOXtSBVYXYcomHJXxSLSS3lHyVfAtbi QxwHeSbfUktJjjs76we0LOQ/MbTf5wi2DdZ8P/A6E83FJyRiRTenTJdVrWgpfAvQfKXb KUJkWXiMhyihGzDc5kA8I/jerAX4Dpeah3j3/2dm8XBMowzRLdCPqvO78fZ2MvgAOhUt kk3w== X-Forwarded-Encrypted: i=1; AJvYcCX/ZV6DdV+zcpHqIze4arZnq+JqViDMaXGHOjoQ6YJv7yTo5TGFaOpiEitOVAz6PzzX7FIX2vTGhbVPKplbaz9B9OK4xr+pVWVbi6Fo7Mqr X-Gm-Message-State: AOJu0YwLRH2vybj9pIqW1W/p4PKdk/EDNXhVlbrAE/o/Rpv4SK9HJGpv mikoHdpAsXL2HMuf9jcT1EYiKuWgw2ZkYkm+/cmIQOCfTamqPnFc X-Google-Smtp-Source: AGHT+IENXEgXUlE1iCKcAwJnjAot/ZQN6otJoUVJ648HYvqQTsTZyqBzY+IgGHSUJOPySHznDNXMhQ== X-Received: by 2002:adf:a45a:0:b0:371:8f15:21df with SMTP id ffacd0b85a97d-371946a3fcfmr8388816f8f.49.1724147039509; Tue, 20 Aug 2024 02:43:59 -0700 (PDT) Received: from ?IPV6:2a0c:5a83:4c09:9d00:ed42:c0b8:e522:cb22? ([2a0c:5a83:4c09:9d00:ed42:c0b8:e522:cb22]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded7c93esm189742715e9.41.2024.08.20.02.43.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Aug 2024 02:43:59 -0700 (PDT) Message-ID: <1d65ca34-92d3-47c9-a92b-a6ae0907cdc8@gmail.com> Date: Tue, 20 Aug 2024 11:43:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: BUG #18576: Using EXPLAIN (VERBOSE) in information_schema.element_types returns ERROR: failed to find plan for From: Andrei Lepikhov To: Tom Lane Cc: Richard Guo , pgsql-bugs@lists.postgresql.org References: <18576-9feac34e132fea9e@postgresql.org> <2336091.1723137115@sss.pgh.pa.us> <2493069.1723149304@sss.pgh.pa.us> <2548861.1723174234@sss.pgh.pa.us> <2799439.1723217127@sss.pgh.pa.us> <332f0e30-f90a-4e47-b668-b53f649c244f@gmail.com> <1385302.1724085401@sss.pgh.pa.us> <5e129a8e-5b8d-4a61-9776-59be99a2c14f@gmail.com> <1390980.1724088410@sss.pgh.pa.us> <7f8bfe01-bc5f-4a93-bcd6-b06e7c24f804@gmail.com> Content-Language: en-US In-Reply-To: <7f8bfe01-bc5f-4a93-bcd6-b06e7c24f804@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 19/8/2024 21:16, Andrei Lepikhov wrote: > On 19/8/2024 19:26, Tom Lane wrote: >> Andrei Lepikhov writes: >>> On 19/8/2024 18:36, Tom Lane wrote: >>>> This seems like it's making assumptions it shouldn't about what >>>> CustomScan does.  If there's an argument for doing this, it should >>>> be added to the adjacent comments. >> The main reason I'm being sticky about this is that if we need to >> allow CustomScan, then it seems likely that we also need to allow >> ForeignScan, and maybe some other things, and then I start to >> wonder if we should have any assertion at all about the child >> plan type.  So I want to actually understand what is the scenario >> in which this will happen. > I understand your point — the origins of ForeignScan and CustomScan are > the same. > However, we also have a difference: CustomScan can be executed locally > and sometimes may allow volatile functions, CTE, and many other things > in the underlying subtree. That's why we can't replay some cases with > ForeignScan stuff. > But ok, it make sense. I'll try to reproduce the case by employing > ForeignScan. Delving into the intricacies of ForeignScan, I came to the realization that implementing a push-down of ROW() expression in FDW is no simple feat. It requires a 'deparse' routine and other complex stuff. While there have been the attempt [1], it appears to be in a raw state, making it challenging to use. Given that ForeignScan forms a flat target list for foreign scans and assembles whole-row expressions locally, it's worth pondering: do we really need to limit CustomScan in the same way? If yes, should we add a 'restrictions' section describing the limitations of the underlying subtree's target list to the documentation? [1] https://www.postgresql.org/message-id/2253e9091b300d868d524c0943fa8796@postgrespro.ru -- regards, Andrei Lepikhov