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.96) (envelope-from ) id 1w9jMr-001gtu-1V for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Apr 2026 12:47:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w9jMp-008P1s-1w for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Apr 2026 12:47:48 +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.96) (envelope-from ) id 1w9jMp-008P1k-0e for pgsql-hackers@lists.postgresql.org; Mon, 06 Apr 2026 12:47:47 +0000 Received: from mail-yx1-xb131.google.com ([2607:f8b0:4864:20::b131]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w9jMn-00000000toC-0H4S for pgsql-hackers@lists.postgresql.org; Mon, 06 Apr 2026 12:47:47 +0000 Received: by mail-yx1-xb131.google.com with SMTP id 956f58d0204a3-65005a8840dso3698305d50.0 for ; Mon, 06 Apr 2026 05:47:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775479664; cv=none; d=google.com; s=arc-20240605; b=AjsQSrFp/7N82KSQiMmO8MpFw1l2w8+R35fs61DT2Y+EVEs0sIylGvypEJc/JB2ulH wEH2FHUU+SIxxEoooft0dKAA00ZpYW9Om00ANprssM61YEW9SenSQ33diC01li3oJNAi Lc81TQWWedz7p7upvsV5Wehg1kgFIBJgkcVh4q+qojLaIolSAkTvJiRQCpJ7rBCpXIPQ Iuc3h5WMSNTtHofUwNzQ2wIWYBoRNOH383LyrbQnlMEXy+UeMl/EtMW3tkQtGxEexIZ3 c0OqN+YkLBvUFBbQggvEsfS0tBMZoiY0FHbypgsZC8oAZJLRG/NYTXKCdY7ntbsd7x9u EKDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=JgItY3VqsYEpasskdqcxek9L1I0xX3WcgMhR1OkNUaM=; fh=r/f/wQ51uIV8f8gKOSGpfqP9xokcUy9BwsHxHBCgvcg=; b=GGLskGFZayuI58REFl+xqIzO3BKt+vDp/deezZgcs1mVAc5ABfhj+6wySTWyWlt1X4 T53xWmzyDfpJiy9Ej1DXUtCstMMWKwKZbgNQalnx5zE8F/GaYK9SC3MBNW4ANRtpn9d8 sRXcZSP0U6JdMZRt2Et0Y2ksbtqfBXouGy/ScK27RGfyAdIuTU8NEuoVCmoZJ+HxLd4v dEkk8y2cz0btFe7yhgZ/wJdTGouvWPmgRQxIMjvsILZ+6TP0L0290FrfA5ls8SbXECNz L4imr+A9GvY+zUhGV2CGOApKORxHRf0HAZLkKHtdIsIBRIyciBS6qLEqvVJiJs6RLduy 0Z6A==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775479664; x=1776084464; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JgItY3VqsYEpasskdqcxek9L1I0xX3WcgMhR1OkNUaM=; b=hMEQsuK7yOZ3mpn3fM/2F7XKi9cQPS+7yFeoSspQaPAee2yjvw2PVybce/3V33E6xI CY/tLhHGZIRgitOwsAM0cUx1CSWt0PjupEzVZokFvABlzBRK8FTgn+DqDt3dfNxC/+6v nAdpghfox9J8Ootvco5I7IyyiX21I6SYpomI/0YtV+mg4It8yaI4tp2s/3VvvZwpjfyu KGxrqt1a9PVMqqRLQsW0GcMk5HTtUAYmDv+YrylIFNtVaO/Jlw5sq+qWnHZXT9RV+Zdd m8dqzdsETJMb3pN/KrL4lxiHahuonj0Jv4rpL94BvKbn2HMaGdXRwuZADDGiGH1X9tNW rfcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775479664; x=1776084464; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=JgItY3VqsYEpasskdqcxek9L1I0xX3WcgMhR1OkNUaM=; b=tLd2bJSZlvHryS4jiD+dqHl2I+Qe+2nAyUcqSwdr+stO5o84/xjMRtLshu35RKt2WF XiW4euTK+WKfy8liRqeytapOr3Tkw5XDtKzNH7CSoUN44l9zlNpHZdJ2Y891E05k2Iid cYaYonSwl5+XnPCVuF4lafIcFu4LnTu4Qd5bzpvNeL4O46XNRlNsxP4Mc5Fh/vq3i7KM KHCnF0ENX4RNIzhnDHuWaIZsVtSHPysZ2bu+vpukbsHs0JOdmjyMpfxASr05jyASooNa MdtRV2oEG/H0mFYKenenV9LwLryRS7eyWFldGb3ik2StHbn0XAINHBxm0qe5F/i1W/ZP XaoA== X-Forwarded-Encrypted: i=1; AJvYcCWxdJsIt51dIMZYuss/z/Nwa2CPBnK+jX+LcveXD3JCFZ5tVFbE4gW9Rnyqt3Rham2FZPDJeHv6jfwapnLE@lists.postgresql.org X-Gm-Message-State: AOJu0YyOdEL/OWJUoKgbSO7IVbjwbwlgVgx9fidxAlijZrYY6j7xH0tG xQxKZJSL02fcjf5URpEEGF7Xh506SROnFXvVq0Am1upZ7xBbskJkFaV8HZ4XT1Ih/+BwlWI1I0f dcnK7PGRm6ekujhYlKa+mn4iA4xb0lSE= X-Gm-Gg: AeBDievJDGaBu7d73OjxR7ALMysAutgHGEImGxR4gqCVsk6N9+eEUubKp2OLDMP8l/3 NMIeyr2gykAhFG8gI4oC7zHUg9ZdpwX+HoG0f0FR8fIgLSqg3xCkQ/txff2QDrAHQ2Y7Zz5SIUM 5nzJVoh0Qbw293wGJ9umm4GM1eOtlVgmGbMzydEhpxiog4Bz/ou6fbDE7Ry0PcBLItdX0Glr392 Q3uINkbdzRy9i36Txs+TLs/WnBbATb68d6s6SuanYVLhmOraJNIkmMGGBvusXCmjZ25PQh9KgB/ gRL9UZ25p4AGXGmW5c1MFgi1vrWgF0cfFxeH57UtWYjzVwxH3g== X-Received: by 2002:a05:690e:1447:b0:64c:f8a3:86d5 with SMTP id 956f58d0204a3-650487fe21cmr12596222d50.42.1775479663946; Mon, 06 Apr 2026 05:47:43 -0700 (PDT) MIME-Version: 1.0 References: <3683430.1775173413@sss.pgh.pa.us> <3817825.1775240432@sss.pgh.pa.us> <3877210.1775272486@sss.pgh.pa.us> <386d8c06-0f96-40bb-b1b1-107db209c676@gmail.com> <2e7bdb5d-68ba-4c65-9931-a865ab6fc3d2@gmail.com> In-Reply-To: From: Robert Haas Date: Mon, 6 Apr 2026 08:47:30 -0400 X-Gm-Features: AQROBzBzS7O_Jn6U4I6H5d1JRkpbif5_XpfAn1pz3onDxYECpb46THQmMqXdGJM Message-ID: Subject: Re: pg_plan_advice To: Andrei Lepikhov Cc: Tom Lane , Alexander Lakhin , Lukas Fittl , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Apr 5, 2026 at 3:57=E2=80=AFAM Andrei Lepikhov = wrote: > Looking back at the pg_plan_advice development cycle, I don=E2=80=99t see= many > discussions about the design. It seems unusual given how complex the > planner's structure is. It makes sense to follow the typical way and let > it serve out of the contrib for some time and see if it works well. > > Introducing such a module into the core would effectively cancel > alternative solutions, as seen with PGSS. Therefore, it is important to > ensure the code is well-designed before proceeding. Do you agree? I don't know how anyone could disagree with the idea that PostgreSQL code should be well-designed, but that doesn't mean that I agree that your particular design criticism is fair, and I definitely don't. As for the amount of design discussion on the mailing list, I was disappointed in that, too. In addition to posting to the list, I privately asked numerous people to help review and test. Some did, but on the whole, I was expecting a more vigorous debate and a lot of people telling me what an idiot I am. Instead, the most common feedback I got was some form of "can you ship it right now, please?". That probably has less to do with the design being good (although I believe that it is) or my code being good (although I hope that it is) than with people just really wanting PostgreSQL to have something of this sort. So I am somewhat afraid that this will turn out to have more problems than anyone has noticed so far, and maybe for reasons that will feel dumb in hindsight. But on March 12th, I asked myself whether more people were going to be unhappy if I committed pg_plan_advice this release cycle or if I didn't, and my educated guess was the latter, so I committed it. If that turns out to have been the wrong call, then I apologize to the whole community in advance. But I do not apologize for the fact that pg_plan_advice tries to interpret plan trees -- which I personally think is one of the best design decisions I have ever made while hacking on PostgreSQL -- or that it can't interpret the variant ones that your extension produces. --=20 Robert Haas EDB: http://www.enterprisedb.com