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 1tuSzh-008qZ6-Fk for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Mar 2025 09:12:17 +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 1tuSzg-00AvkM-48 for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Mar 2025 09:12:16 +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 1tuSzf-00Avk3-Oh for pgsql-hackers@lists.postgresql.org; Tue, 18 Mar 2025 09:12:15 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tuSzd-003TeR-31 for pgsql-hackers@lists.postgresql.org; Tue, 18 Mar 2025 09:12:14 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-43d2d952eb1so17272965e9.1 for ; Tue, 18 Mar 2025 02:12:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742289132; x=1742893932; 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=BTdUqRUAA0roJWMWEGkvoDdb+mE21x23WdzpdWOIaSY=; b=kRjSGDxCqTqHoLFgjdnKQw6Xe8/uWZBrNCGyPCiZ2Yk44gh/z22bVOqakb2m0CzRU2 bB9oiAkpjxhV59oKzX8Z0JA+BCWFZILNs8JiLnWoCHadz02ZzdeOlwlfAO8XkTFvqI9I 7P3a2njF2DaauQgsjn7cCAbc8jcN+dsnGUtiJQPoKcSCdMrh1MHP1JSIuK29ZWgGg+ob +VE4FXZeg4PLPHQSSPBHsXYpt2mo9krs9+cjQMPk8eLnEIOYkDzpT3s/tP+gBbG+PU5F SfutAB5P5nRoCu16VzSiFdPFyyM4k4CcyOv35gvSf/2BgPIkG/hM7bMJOU81LhVNzOM9 TA5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742289132; x=1742893932; 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=BTdUqRUAA0roJWMWEGkvoDdb+mE21x23WdzpdWOIaSY=; b=colPYv/6FYV5VNcRu+Y2PP4cLFvQeUseqyw+JEqwaQuHmkBGlWjMSkWWqFSBXuR2nq Ag2dowDqGyt/GflTQTfNT8PLKfhKlv0bMd6jGWYQUpIlHuKkT93zAesBEg5hKMETGn8d uhf3krvsiTaOhpMaDwVhgE17h2UpchNwL4+vAEcV0v3MD6T5jUmetzmmipYGgjAw20fC 7AW7BdbDdWSgaOi9NdaWig1XGZ2nzZNLE0UXLYVH8DOsgDNg1AvkHOEBV6sLJigR+ogf a0DkWzc4IBJHg06ob29H0PJWafagyLjQ/qyKI0zNp6K9NAJUXs+h73nRDDSD0BVjeMMz G67w== X-Forwarded-Encrypted: i=1; AJvYcCU4l3Y9a3ZyFjLTwo3TuquW++bD86w6OYEQZiP5EhvJwPIMl/HkT3Mnk4CF4FkA2t3ZailIKZKRLcKSNA4K@lists.postgresql.org X-Gm-Message-State: AOJu0Yxc+1Psrndv3M9S8FlECH9/uZuPAiKJxeNq8jJ+rSaBWzP6CfVg TSjpXI6alneTp0/yEb6n+m4gxIYRHje0Y8ZnLVe0d7ltpOXKGl6I X-Gm-Gg: ASbGnctSWjBofx3LJo70tXUK9ObZKrL0ibYdrbaIlQ7rjuPgTpCfCM3EY/IM+63RXAZ sOTPRw9l4k9xOTSZE+ZkqSkAB2qpsF0uFDYfIRpVnVtRmNWmmz0zDC9JICpbu6sNzidW4gypJ7R 8Wztcmb0uQjN48tQwPeD8FAZLGSdQfCRtrVAQZlgBi8S525HCNngNLTl0igsjSeE1ri2gKQ+fzi uEYvrgfKyigCxw94Tl+KHzTDFgC2Vcf68CC98z/9o7ss8Ug+0RQR+3OOp5MXgOvo57E7cj3x6P6 ObJJ5AxFz4Jjz58ufpCNmq8n7HTMzEPM2Yn8plK96R9wUxbGqFfs6uxDTI60WT1tKK1pdHBroKs eWQg= X-Google-Smtp-Source: AGHT+IH+oosDpHLcIWg3QLd70jGdKknA5ncGtrz6EbZWZCwcsYAfWAdowq/yOme+g97XJjyAYFE2KA== X-Received: by 2002:adf:cc09:0:b0:391:39fb:59b4 with SMTP id ffacd0b85a97d-3996b467c8dmr2001178f8f.27.1742289132069; Tue, 18 Mar 2025 02:12:12 -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 5b1f17b1804b1-43d1fe065a5sm128017665e9.12.2025.03.18.02.12.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Mar 2025 02:12:11 -0700 (PDT) Message-ID: Date: Tue, 18 Mar 2025 10:12:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Optionally record Plan IDs to track plan changes for a query To: Michael Paquier , Sami Imseih Cc: Alvaro Herrera , Greg Sabino Mullane , Lukas Fittl , PostgreSQL Hackers , Marko M , Julien Rouhaud References: <202502131125.3kk6id4tcrtv@alvherre.pgsql> 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/18/25 08:31, Michael Paquier wrote: > On Thu, Feb 13, 2025 at 10:44:33AM -0600, Sami Imseih wrote: >> The reason for the change is because "query jumble" will no longer >> make sense if the jumble code can now be used for other types of >> trees, such as Plan. >> >> I do agree that this needs a single-threaded discussion to achieve a >> consensus. > > FWIW, I was playing with a sub-project where I was jumbling a portion > of nodes other than Query, and it is annoying to not have a direct > access to jumbleNode(). So, how about doing the refactoring proposed > in v5-0002 with an initialization routine and JumbleNode() as the > entry point for the jumbling, but not rename the existing files > queryjumblefuncs.c and queryjumble.h? That seems doable for this > release, at least. It seems pretty helpful to me. Having a code for hashing an expression or subquery, we may design new optimisations. I personally have such a necessity in a couple of planner extensions. At the same time, generalising jumbling code we may decide to work on the JumbleState structure: code related to constant locations may be replaced with callbacks - let the caller decide what action to take on each node (not only constants). Of course, it is not for current release. > > I don't think that we should expose AppendJumble(), either. Agree -- regards, Andrei Lepikhov