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 1tuAHt-004IyY-A3 for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Mar 2025 13:13:49 +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 1tuAHs-00CZTZ-0Y for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Mar 2025 13:13:48 +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 1tuAEe-00CTYA-Hr for pgsql-hackers@lists.postgresql.org; Mon, 17 Mar 2025 13:10:28 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tuAEc-003KJ1-1g for pgsql-hackers@lists.postgresql.org; Mon, 17 Mar 2025 13:10:27 +0000 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-390fdaf2897so4135257f8f.0 for ; Mon, 17 Mar 2025 06:10:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742217025; x=1742821825; 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=BXA/0u9/nl9ZniKct/3Q2ygzF9An0jEXkk31RvZVp3s=; b=MMu+pjI0dj0dy2XqvTq7Vm6VfcM16O0RhftKIBW+xrmmdyelWCMvudZCnnljZk0diV 7gY8TcZgAThFhHOn0KqbCkVVDBlTn0xWBTK8lWLJAHU7PzJuTbA9TYPyWnqbIjmgO4ri sSTEtAWmqKqtQrO37LSNl4BiACGnLXi8x3F+W4z6jd7IIzqPSoMwCat6IH63GxZHx+c0 xJJVeLVb6Cg04j0ZjPksjTnkdBOH5DX/fPnZ7c590q0mu4zOvW18o09IxtBpV1RgEkHh VZqxvqgoKcB4kNGDwI1WnKEmiDBLOGsu19I/WXfes/uTHu75PIO/rIeiE/ii+9zkzz4a 4MRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742217025; x=1742821825; 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=BXA/0u9/nl9ZniKct/3Q2ygzF9An0jEXkk31RvZVp3s=; b=HghupsEpJ+q6BsQDfseXIkBtYNFHL/eeQ21MGy+jExWd5nDiKERw5bCVj3A2blptgF QPQe1BqfgQw7akaf7fdk5CO/IzRdoQuQL/pkb+yoeT9KnVAiBQqXo7RJwV8o4Cxw0fit CDeF35Ybud+oK+f/rDBx+I11D19itlxJsC1n/S8PGcyCEuJovB/pqPTIKg+tBW9oRPwF 3p6LXSuEXzU659NiOBP4YIgy0NonGP78OaQnCgUzLr+7e1hzlvcckHYy3JyArilHw41V umIfsvm0mQxKdYOScHFY3SqLRr9Khd88TTMQeMKkxzCobc4NCwjcEu8wsdKHlkKnFEhI OBzA== X-Forwarded-Encrypted: i=1; AJvYcCVocrvgq6Dwb0TFusnv9xxDK4vwF5pOpDc4Bg+qgMPrXIPyYOR6MDelEl6olpoNJuLxCyUekOImVPmdedLq@lists.postgresql.org X-Gm-Message-State: AOJu0Yz0uw53hPjJtRtHi26NBB4zZMqsdAQYMqD+OSVsFQvyU/CBS4hm fa4x+tlF65fIuS6YXPvbiEa1BCZtazniTnZjVP4NP8Qz31rMxBJz X-Gm-Gg: ASbGncvbP2PZxgcOFFG2CfIcdXAsdid8IZpJF5+pNszY0x8wC/udSwstfFyNfg7Sd6X GRgiSYpeW3IBMvup6tWpAOBcdF+mJTqOGjeju5BSL1yJrA4Ly1SD//mQbfgHjymo++NjPLMlh7s TEhXjWvmBuubCl5UdwHqlWZIeTAO04hLh4Z1BtMIC5M74G2j4EXPlZ6Cf1d0/7adWwkSDhItndf xyNGEJV/R0L0+fwpaSV0QkuQtRbeCH/tCxe+CbN5S+qDQZK0bbiyrBDgLg4vrkP6KyuXS7KJjAf sesT7JmcTkv5Lo5q24lKhcI3OPo+lExNndBet4x4/KL1TSLn9Wi3MWj7Wo93ZlfiZXpdG6Lwd7C hJ0U= X-Google-Smtp-Source: AGHT+IHdoXdPEzaf7IXQtnczwkU/3xlAnspdsQ/X08WmF330F4MFs9j7/FL+4T4eZcLBtRUP25VWVg== X-Received: by 2002:a05:6000:381:b0:390:f0f3:138a with SMTP id ffacd0b85a97d-3971e96bdd0mr12547179f8f.27.1742217024965; Mon, 17 Mar 2025 06:10:24 -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-395c4f9d59dsm14988769f8f.0.2025.03.17.06.10.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Mar 2025 06:10:24 -0700 (PDT) Message-ID: Date: Mon, 17 Mar 2025 14:10:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: making EXPLAIN extensible To: Sami Imseih Cc: Robert Haas , 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> <2234935.1741809008@sss.pgh.pa.us> Content-Language: en-AU From: Andrei Lepikhov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 3/12/25 20:58, Sami Imseih wrote: >> I think this is a seriously bad idea. The first line is already >> overloaded; we don't need several different extensions adding more >> stuff to it. > > Fair enough. > >> Plus, this doesn't consider what to do in non-text >> output formats. > > the hook will be a no-op for non-text formats, which is not > desirable behavior. I get that also. > > I have no strong feelings for this, but wanted to see what > others think. I'm against it. For me, the best model there is to allow extensions to add something and nothing more. If it wants to change the core explain code - use ExplainOneQuery_hook instead. The reason here is to reduce possible competition among extensions. I already have troubles with conflict on queryid modifications and potential conflict in the planner_hook - if someone invents another extension that will provide a plan tree. So, it would be better to reduce conflicts whenever possible. -- regards, Andrei Lepikhov