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 1vL0RT-0009z3-1q for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Nov 2025 14:42:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vL0RS-000Dfj-0Q for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Nov 2025 14:42:54 +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 1vL0RR-000Dfb-2l for pgsql-hackers@lists.postgresql.org; Mon, 17 Nov 2025 14:42:54 +0000 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vL0RP-0000jW-2l for pgsql-hackers@lists.postgresql.org; Mon, 17 Nov 2025 14:42:53 +0000 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-7aab7623f42so5194167b3a.2 for ; Mon, 17 Nov 2025 06:42:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763390569; x=1763995369; darn=lists.postgresql.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=OqKu4oW1bAKj/yIHCmWFAgYJlMf69MZJ9cZNjxXnBCY=; b=Z92nD5C4O8lE8xilnl8jj1vYDX+7CPiY6yZfotKJO68NtKYgYY4og1kCRvFZ3xEen0 FZ4AAUztIKpLrv0wQVCywDhRGy+cNAzgov3J/HV5LWJsYG2tGLmzim9x2Z0RshLkhRA5 mR3B6Z8i9AkKan203x9Dj2A45P6SospdPbNkwKakuYVJYG5o2mL+rBVek3WP1T8rb3yD oJNAK3+VUgeyMj22ETsYJ1i6N59lR4Z1Wkh4XcFa2c1BBeA3bivaHKq23tCEjXwps4hc +w9A6FapVawGmTjUJMZsVwgzq/XXyMQ0B6BZj1qKsFcrcbmJ28m6hBc8DujELC+iE2Aj EzEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763390569; x=1763995369; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=OqKu4oW1bAKj/yIHCmWFAgYJlMf69MZJ9cZNjxXnBCY=; b=wzs6m6An9mXjurBXxzWubpbSQl6EPDsSuVBPNnFmrPB7ZNqO5vNqI7gYxmW25JvDBT CQinn4k2iUWkMXfbrRh1EoIVxc5EN3tDdpT2TdoikogavLLJZ5PaP/PesgL++n3gbYI6 GECnmZQVer3Cy4Dhzi2iOCe1aCA87i6E3wmqTQKwIOQ3X2AgiXVgqLElhbwNzVdbv2o9 RJkFwS9hya7R17Z2OvB7EDDa8fZAoL0Lcq3vn2zL/SWysRfPgK0/LvhzxCOSplQ12DHC GAySwFOqSsnMPLzdQB+4OvzCYMaeIalX9nBxLauAez+Zj7ai15gsOaYF5nwbKeJXMGLA iyiw== X-Gm-Message-State: AOJu0Yy/EGpwfAA8WFG5ZAQQvwQTVz6cZ9wA2Z55h1lAjOQM3od3ErP1 Pe/e2d3FqVv2/WmM71S0mTWgqavdxgfePvdE31egSw350SrCbkmI5wPaqcXS9g== X-Gm-Gg: ASbGncsdRhVpUsPUUUJxvLO5UCDs0hirbnzd9JsBcJQiJlkmUuvKO80LMKZXZxZz6ve irrHP/UgMhKOflqwSdsTwVQmDky04RSusNoh7CXnu6jtnSeum5FBFN/TG3EiUWlSCof+xHyA/9m Os+K9dzoUZQcHDGIxhoUiHwPBnNiNHUpeRBMXntQNXYyES977IDY+Sm74xUEhqUwORoCJ/kQgtc xN3Q8+aliOoWh3AAqJfhRVM+B0tX6gYNYHPx16bs3t4nZcZdiGV2PPCEpwihJ2fSMsCX/Q2Q/t8 5KBbGb39CcRs1/O3krWicN7Y1SNH5+zv43INZ+QHB99T6OpyNvjoCP6nAuVoooGdg/LQAGwgbnl rmGJo0doSAIL6erPTIDmEcuD7RDGsSxEC39sMeNyunsYrEtIfU0le+OxJcnzJYyQK7VFBqV1PEZ ibpb4xS4n8dRmw4/gBHClviYhSz1YZkPif6A== X-Google-Smtp-Source: AGHT+IFRIiy9QV0EY/fVQjAEve2VkNump9PdbPnefoTv2DrtWgkiQ2Vd2f5qDgbnzG5pa5vg5Aae+Q== X-Received: by 2002:a05:7022:ff41:b0:11a:51a8:ec9 with SMTP id a92af1059eb24-11b41703d71mr6224085c88.29.1763390568873; Mon, 17 Nov 2025 06:42:48 -0800 (PST) Received: from localhost ([2804:14d:328a:a59c:54d8:fd9a:daac:6358]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-11b0608860fsm40609542c88.5.2025.11.17.06.42.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Nov 2025 06:42:48 -0800 (PST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 17 Nov 2025 11:42:45 -0300 Message-Id: Cc: "PostgreSQL Hackers" Subject: Re: pg_plan_advice From: "Matheus Alcantara" To: "Robert Haas" , "Jakub Wartak" X-Mailer: aerc 0.21.0 References: In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi On Thu Nov 6, 2025 at 1:45 PM -03, Robert Haas wrote: > Here's v3. I've attempted to fix some more things that cfbot didn't > like, one of which was an actual bug in 0005, and I also fixed a > stupid few bugs in pgpa_collector.c and added a few more tests. > I've spent some time playing with these patches. I still don't have to much comments on the syntax yet but I've noticed a small bug or perhaps I'm missing something? When I run CREATE EXTENSION pg_plan_advice I'm able to use the EXPLAIN(plan_advice) but if try to open another connection, with the extension already previously created, I'm unable to use once I drop and re-create the extension. tpch=3D# create extension pg_plan_advice; ERROR: extension "pg_plan_advice" already exists tpch=3D# explain(plan_advice) select 1; ERROR: unrecognized EXPLAIN option "plan_advice" LINE 1: explain(plan_advice) select 1; ^ tpch=3D# drop extension pg_plan_advice ; DROP EXTENSION tpch=3D# create extension pg_plan_advice; CREATE EXTENSION tpch=3D# explain(plan_advice) select 1; QUERY PLAN ------------------------------------------ Result (cost=3D0.00..0.01 rows=3D1 width=3D4) Generated Plan Advice: NO_GATHER("*RESULT*") And thanks for working on this. I think that this can be a very useful feature for both users and for postgres hackers, +1 for the idea. --=20 Matheus Alcantara EDB: http://www.enterprisedb.com