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 1tuXUM-009d2L-Eb for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Mar 2025 14:00:14 +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 1tuXUL-00FOBc-6j for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Mar 2025 14:00:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tuXSV-00FJsU-LR for pgsql-hackers@lists.postgresql.org; Tue, 18 Mar 2025 13:58:19 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tuXSR-003Zjb-2e for pgsql-hackers@lists.postgresql.org; Tue, 18 Mar 2025 13:58:19 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4393dc02b78so21804175e9.3 for ; Tue, 18 Mar 2025 06:58:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742306295; x=1742911095; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=regRWlZY1lF0kdsFW3xVeA60MK/tXIYRRqpZ6uQH4q8=; b=CVT3KrmHAC/E3Ih9WALJwrIGpH6rQ/t4VFB+Jvg4UHlZEJu6dk4szbugY3HSvUIvW0 4T654Ecd4x+jHZmuWKX6VRi94YYUupfPUfcgkDmD1TGc0s29zGtuIoZvTzA3CduyzfVA WjyCyn8j5zp1zPU00GDa6tsp9JSFgrz1I9gKUszZ6GCxBzVYxAeSbv1iW56IQWIQElPq lPN/gwSvc6YWmMFsMxE3zT3ysHRaYzGRF1cRFUh3gS7aVf1RsHMYIU+Zw6SCt3IF1/sH igy3MJ7/sLrHrFTnj5SZl8YJG7I1QRf8loCS1V2vjxp6X5LdBh7u0QGyADHijinFeWZ4 6t9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742306295; x=1742911095; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=regRWlZY1lF0kdsFW3xVeA60MK/tXIYRRqpZ6uQH4q8=; b=Dt65nlyc29QhfMDngWbbkWTAtERP04RsTuheBX3sexp2FZccBD9pG5baGeP5D9EKcb DM+Smd0oT5n7w+wsN36JSKoe2leNCbOTK92N+GyiH2fiHfdHcfhNBUQV9mF3moRhOibN 74UwXj0pUt8G01r4X90xYy4XISUjxuccoyrBkXdsRz0DiR6fAYz7hvauEahR8spKQ2NF Qx+TFaK4s7JPJKszbRloV9Y/kUMG6Knr8Ctb/1TRkw1KqNLm4ompVyP2Wg+K6bq8gT5I mWjFOOYpuPRf1Fo484WdSCrc6vfojkwYmPtCxjC1C+oIjNLmuSpBLS+VVk+HxJEHWPv2 tWFA== X-Forwarded-Encrypted: i=1; AJvYcCWhK093Tm5MDBDADDJQ5Z6K2PeLpvV7dhfUcKl/4UdkVLpEBB0Kb5/SWDP876a1V9tKRSCQlfjiIwokhQnS@lists.postgresql.org X-Gm-Message-State: AOJu0YwOfYMq+iOLfL61yBYOefOOShWh0O8hSdZ+l5Bu2YZEn1/xuqfY S3WeOvEKbOO2/kYbC91e5qI42MD5GamCAg0nsGb9pHSGNLjVvsMC X-Gm-Gg: ASbGncuGdgHFWuunI10yxMO9k0D6D3TiFlIL2NM6FZimpKhhA+8n1RvPFJNIUsK86pa mFjBXchMroqqcYduE9fMnjKXZ2RJpOR0GvnnhJGbvmHSgriBlzk1wgspWwt168wH7bMJrXhwG4w 1rGj9L6M7nkTGZKScEaZFuHeRcgI0/iWSKlKFzV6D6g9pzp5oRK/zbpGNpCTJ9/QPqxE6lPV5oV jRf/a/pRLA6HrKMtL6uKu3lp/lTCaB6Kxy1BPP4YKi2s6dS4cEthULvu1SORZpF3V87A2Z1s4Zk 1imMhNPcqGUHPeWgfYGBpiHZtitVYiLSnHRU/QnHi1r+lEz+UnCPLjlXJMZuZsdFdQMcI1iegVh pnMs= X-Google-Smtp-Source: AGHT+IEsIuXHfraaWAXxiFhkmZvDIRa9Speq4F3PeEvSZhgrVh/NpfCY4nthQOm9n+l6a9h/SN9K7w== X-Received: by 2002:a5d:584a:0:b0:391:2192:ccd6 with SMTP id ffacd0b85a97d-3971ee44b62mr19693503f8f.39.1742306294542; Tue, 18 Mar 2025 06:58:14 -0700 (PDT) Received: from [192.168.0.89] (84.123.232.230.dyn.user.ono.com. [84.123.232.230]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-395c7df339asm17982409f8f.3.2025.03.18.06.58.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Mar 2025 06:58:13 -0700 (PDT) Message-ID: <27476b3c-5d08-428f-b77a-b9d56f30db69@gmail.com> Date: Tue, 18 Mar 2025 14:58:12 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: making EXPLAIN extensible To: Robert Haas Cc: Jeff Davis , Thom Brown , PostgreSQL Hackers , Tom Lane References: <5bbca514250c1f8ee45f08ada94184b0ae109fe9.camel@j-davis.com> <82f96eed213c8d76b36b8a3f504576e5af493270.camel@j-davis.com> <339167.1741200807@sss.pgh.pa.us> <476382.1741208421@sss.pgh.pa.us> <480078.1741210736@sss.pgh.pa.us> <899469.1741295787@sss.pgh.pa.us> <760b4c92-6790-40e1-8a2b-631744a51433@gmail.com> Content-Language: en-AU From: Andrei Lepikhov In-Reply-To: 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 3/18/25 14:33, Robert Haas wrote: > On Tue, Mar 18, 2025 at 8:02 AM Andrei Lepikhov wrote: >> Some questions: >> 1. I think, hooks ExplainOneQuery_hook_type, explain_per_plan_hook_type, >> explain_per_node_hook_type deserve to be moved to explain_format.h >> At least, inside the hook, we usually use functions like ExplainProperty. > > -1, because the hooks will be called from explain.c, not explain_state.c. Ok. > >> 2. In my patch I inserted the hook before the line 1894: >> /* in text format, the first line ends here */ >> Why have you chosen a different way? I don't have specific reasons to >> insist, except the extension data right under the node looks better to >> me personally. > > Tom discusses why we shouldn't try to add to the first line in > http://postgr.es/m/2234935.1741809008@sss.pgh.pa.us and I'm fully in > agreement. I agree with him, too. But, as you can see, I proposed not changing the first string or adding something there but just putting extension data under that line. Extra information about workers' state (not so important most of the time, I should say) sometimes makes it difficult to read. > > I've committed 0001 and 0002 for now. The additional hook for > cross-option validation can be added in a separate commit. v6-0003, > now v7-0001, needs more substantive review before commit. I hope it > gets some, and soon. Ok, I am ready to review it thoroughly, if needed. -- regards, Andrei Lepikhov