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 1w9ju9-001hRg-0u for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Apr 2026 13:22:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w9ju7-008auO-1u for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Apr 2026 13:22:12 +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.96) (envelope-from ) id 1w9ju7-008auF-0y for pgsql-hackers@lists.postgresql.org; Mon, 06 Apr 2026 13:22:11 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w9ju5-00000000rBc-28zi for pgsql-hackers@lists.postgresql.org; Mon, 06 Apr 2026 13:22:10 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-488af9fdaa7so5143765e9.1 for ; Mon, 06 Apr 2026 06:22:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775481728; x=1776086528; 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=yeEgTbhwaj9G4QPR16Mf6iM4850EsKvhvNdj2y6HlHc=; b=PV1gHx8d+AgBy1prZe8MK9zqzGfVIUFYuMkisMOebZdc6BU9rIwP6gLBb/5cf9O6gf giA3IoDRsK/qT8WsCNrrOicDUvroHszJSdC2OGdVvr6s2lRmYmn2XHN76WpEcTnEl8NG RMkTbyMRSNaQCBmVG3qTnUAIkBvUNfAkuOI4hPOlOjPlv96peY30r4BbmKi/I6e/6oe9 zX2PKbT988M8SlziYD0TQvDD7KV+4nlXat8FwFxtzd3QN8IcVnyPUJj0yZ7z/66+dBOW GG71iqHROLmgR2Cp9lhkZ0X3myM7NnlzXH8aeDSahRPYonBDmRFRBGFwBVCKe+Yoxjmx QWZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775481728; x=1776086528; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yeEgTbhwaj9G4QPR16Mf6iM4850EsKvhvNdj2y6HlHc=; b=nQyiO5W44VDVfZNDWMXSwmyeBRVt0OF2IqEi3WP7BKJ/dpKN75c+JrwGuBOrbk1cyo bOhnuaUj2HoAeY3KfwKULuC5/ncIqzXIYMoKgRWzHjzdHyc++Kqpuv4JPuy8g+Mh8oJi 0koa2hDDu552/qF1s0qUAxKXkgjYVZJyZ0lejww12D27oC6RnB4DhPTvJBVF3jE3xd0S SkD7zgND9Gqeb+iq95nrAn/QxvLxTyqsS58X9j+Y1jdFBFxX2nghei0GiGAckXThyKfm bt+YshqNqPKOSWBsdWxkyXXdHeBuzKlh/fu7/NZWfQP5Rgem1zOY8POIlYVf98J/IyrP 7rPg== X-Forwarded-Encrypted: i=1; AJvYcCXVIdyvyH79jVkNvBPcfuiA8yXWQLPvCttwFO8RYg7DZ554XU+A1B08o2qAEoBmjstX0BWn9r6/WMZywoVe@lists.postgresql.org X-Gm-Message-State: AOJu0YxrLWJAZAFUj2xnrg/qTHtx+cVQnaHa8ZsgoZPB+aDd9Tr6iBX6 YlAl/64oir+ERYXlzK3H8f8aHQO54jHXED1RpfhZF0u4DUrcMuARH5eV X-Gm-Gg: AeBDieuoa0ptQI7ghYJoRo35YWKoL1fD6dTpInRiivLLPXSrLGlA9CYVTqln7jaglYG DGBHJPpHFcKdB0PA40nxAxnZ8E58u1pC2Rc3CyZIJs2G8CqjrETxczHsPRaXirkK7SHlWjhcDpb Uwp0RNpTtoXx3m2q2DP9aEZ9DfM0T7FOslFnw/OcwmxDEl5qTShZnG/E8IZF1VbGFi1gGSt7RSc uoXw7l3RRkZFgdkRzF2+dPfnLcAbkClymM+QXM0w2kVw+QUV8ZdQG6cAj66AL3tiKTYqzSOOzuI RbCJ4LRCcQgFwwVE5IzwwrxPRQmQs7mxi8hWl/1kFqxB67mw8fVo75mz+t+f2kUM+YFpfqzbpr/ E6VZQWia/PjRTkcHKaIv9jLYZTZQa2e63Ttp+MNAtblET+1Ueqs5VxIHGFo0uVvdw1PTo8urk7J PkBCCGJn5r6rRIC/ITDXbaqE5aryKCongykbd8/g== X-Received: by 2002:a05:600c:c16f:b0:488:aa3d:faca with SMTP id 5b1f17b1804b1-488aa3dfd4amr84511875e9.18.1775481727950; Mon, 06 Apr 2026 06:22:07 -0700 (PDT) Received: from [192.168.15.156] ([80.251.191.198]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4887eb5aff3sm658660855e9.15.2026.04.06.06.22.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Apr 2026 06:22:05 -0700 (PDT) Message-ID: Date: Mon, 6 Apr 2026 15:22:04 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pg_plan_advice To: Robert Haas Cc: Tom Lane , Alexander Lakhin , Lukas Fittl , PostgreSQL Hackers 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> Content-Language: en-US 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 06/04/2026 14:47, Robert Haas wrote: > On Sun, Apr 5, 2026 at 3:57 AM Andrei Lepikhov wrote: >> Looking back at the pg_plan_advice development cycle, I don’t 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. > 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. I challenge solely the design of the extension, not interested in holy wars on the hinting approach. Postgres modules that use hooks are second-class citizens because the core hooks were never designed to let an extension module be as effective as the core code. It's probably OK, considering safety and maintainability concerns. But this extension effectively makes alternative modules third-class citizens (not sure such a term exists in English) - people prioritise contrib modules over any others. And they definitely will use this one. So, I envision complaints about conflicting extensions in the near future - think about Citus or TimescaleDB optimisations, for example. It would be better to introduce such a code at the beginning of the development cycle, not right before the code freeze. At least we would discuss its design without rushing. -- regards, Andrei Lepikhov, pgEdge