From 497116b76d2716192b6cb2074ea6a4bde7c01412 Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Thu, 3 Apr 2025 20:06:22 -0500 Subject: [PATCH] Download extension if it does not exist on the filesystem (#11315) Previously we attempted to download all extensions in CREATE EXTENSION statements. Extensions like pg_stat_statements and neon are not remote extensions, but still we were requesting them when skip_pg_catalog_updates was set to false. Fixes: https://github.com/neondatabase/neon/issues/11127 Signed-off-by: Tristan Partin --- compute/patches/pg_hint_plan_v16.patch | 29 ---------------------- compute/patches/pg_hint_plan_v17.patch | 33 -------------------------- vendor/postgres-v14 | 2 +- vendor/postgres-v15 | 2 +- vendor/postgres-v16 | 2 +- vendor/postgres-v17 | 2 +- vendor/revisions.json | 8 +++---- 7 files changed, 8 insertions(+), 70 deletions(-) diff --git a/compute/patches/pg_hint_plan_v16.patch b/compute/patches/pg_hint_plan_v16.patch index 1fc3ffa609..e9df2a3446 100644 --- a/compute/patches/pg_hint_plan_v16.patch +++ b/compute/patches/pg_hint_plan_v16.patch @@ -2,23 +2,6 @@ diff --git a/expected/ut-A.out b/expected/ut-A.out index da723b8..5328114 100644 --- a/expected/ut-A.out +++ b/expected/ut-A.out -@@ -9,13 +9,16 @@ SET search_path TO public; - ---- - -- No.A-1-1-3 - CREATE EXTENSION pg_hint_plan; -+LOG: Sending request to compute_ctl: http://localhost:3081/extension_server/pg_hint_plan - -- No.A-1-2-3 - DROP EXTENSION pg_hint_plan; - -- No.A-1-1-4 - CREATE SCHEMA other_schema; - CREATE EXTENSION pg_hint_plan SCHEMA other_schema; -+LOG: Sending request to compute_ctl: http://localhost:3081/extension_server/pg_hint_plan - ERROR: extension "pg_hint_plan" must be installed in schema "hint_plan" - CREATE EXTENSION pg_hint_plan; -+LOG: Sending request to compute_ctl: http://localhost:3081/extension_server/pg_hint_plan - DROP SCHEMA other_schema; - ---- - ---- No. A-5-1 comment pattern @@ -3175,6 +3178,7 @@ SELECT s.query, s.calls FROM public.pg_stat_statements s JOIN pg_catalog.pg_database d @@ -27,18 +10,6 @@ index da723b8..5328114 100644 ORDER BY 1; query | calls --------------------------------------+------- -diff --git a/expected/ut-fdw.out b/expected/ut-fdw.out -index d372459..6282afe 100644 ---- a/expected/ut-fdw.out -+++ b/expected/ut-fdw.out -@@ -7,6 +7,7 @@ SET pg_hint_plan.debug_print TO on; - SET client_min_messages TO LOG; - SET pg_hint_plan.enable_hint TO on; - CREATE EXTENSION file_fdw; -+LOG: Sending request to compute_ctl: http://localhost:3081/extension_server/file_fdw - CREATE SERVER file_server FOREIGN DATA WRAPPER file_fdw; - CREATE USER MAPPING FOR PUBLIC SERVER file_server; - CREATE FOREIGN TABLE ft1 (id int, val int) SERVER file_server OPTIONS (format 'csv', filename :'filename'); diff --git a/sql/ut-A.sql b/sql/ut-A.sql index 7c7d58a..4fd1a07 100644 --- a/sql/ut-A.sql diff --git a/compute/patches/pg_hint_plan_v17.patch b/compute/patches/pg_hint_plan_v17.patch index 3442a094eb..a244452cfe 100644 --- a/compute/patches/pg_hint_plan_v17.patch +++ b/compute/patches/pg_hint_plan_v17.patch @@ -1,24 +1,3 @@ -diff --git a/expected/ut-A.out b/expected/ut-A.out -index e7d68a1..65a056c 100644 ---- a/expected/ut-A.out -+++ b/expected/ut-A.out -@@ -9,13 +9,16 @@ SET search_path TO public; - ---- - -- No.A-1-1-3 - CREATE EXTENSION pg_hint_plan; -+LOG: Sending request to compute_ctl: http://localhost:3081/extension_server/pg_hint_plan - -- No.A-1-2-3 - DROP EXTENSION pg_hint_plan; - -- No.A-1-1-4 - CREATE SCHEMA other_schema; - CREATE EXTENSION pg_hint_plan SCHEMA other_schema; -+LOG: Sending request to compute_ctl: http://localhost:3081/extension_server/pg_hint_plan - ERROR: extension "pg_hint_plan" must be installed in schema "hint_plan" - CREATE EXTENSION pg_hint_plan; -+LOG: Sending request to compute_ctl: http://localhost:3081/extension_server/pg_hint_plan - DROP SCHEMA other_schema; - ---- - ---- No. A-5-1 comment pattern diff --git a/expected/ut-J.out b/expected/ut-J.out index 2fa3c70..314e929 100644 --- a/expected/ut-J.out @@ -160,15 +139,3 @@ index a09bd34..0ad227c 100644 error hint: explain_filter -diff --git a/expected/ut-fdw.out b/expected/ut-fdw.out -index 017fa4b..98d989b 100644 ---- a/expected/ut-fdw.out -+++ b/expected/ut-fdw.out -@@ -7,6 +7,7 @@ SET pg_hint_plan.debug_print TO on; - SET client_min_messages TO LOG; - SET pg_hint_plan.enable_hint TO on; - CREATE EXTENSION file_fdw; -+LOG: Sending request to compute_ctl: http://localhost:3081/extension_server/file_fdw - CREATE SERVER file_server FOREIGN DATA WRAPPER file_fdw; - CREATE USER MAPPING FOR PUBLIC SERVER file_server; - CREATE FOREIGN TABLE ft1 (id int, val int) SERVER file_server OPTIONS (format 'csv', filename :'filename'); diff --git a/vendor/postgres-v14 b/vendor/postgres-v14 index 35bc1b0cba..bce3e48d8a 160000 --- a/vendor/postgres-v14 +++ b/vendor/postgres-v14 @@ -1 +1 @@ -Subproject commit 35bc1b0cba55680e3b37abce4e67a46bb15f3315 +Subproject commit bce3e48d8a72e70e72dfee1b7421fecd0f1b00ac diff --git a/vendor/postgres-v15 b/vendor/postgres-v15 index 6cea02e23c..4ac24a747c 160000 --- a/vendor/postgres-v15 +++ b/vendor/postgres-v15 @@ -1 +1 @@ -Subproject commit 6cea02e23caa950d5f06932491a91b6af8f54360 +Subproject commit 4ac24a747cd897119ce9b20547b3b04eba2cacbd diff --git a/vendor/postgres-v16 b/vendor/postgres-v16 index 473f68210d..26c7d3f6de 160000 --- a/vendor/postgres-v16 +++ b/vendor/postgres-v16 @@ -1 +1 @@ -Subproject commit 473f68210d52ff8508f71c15b0c77c01296f4ace +Subproject commit 26c7d3f6de6f361c8923bb80d7563853b4a04958 diff --git a/vendor/postgres-v17 b/vendor/postgres-v17 index 22533c63fc..7ec41bf6cd 160000 --- a/vendor/postgres-v17 +++ b/vendor/postgres-v17 @@ -1 +1 @@ -Subproject commit 22533c63fc42cdc1dbe138650ba1eca10a70c5d7 +Subproject commit 7ec41bf6cd92a4af751272145fdd590270c491da diff --git a/vendor/revisions.json b/vendor/revisions.json index 7b2d5fda8e..0f581dc79e 100644 --- a/vendor/revisions.json +++ b/vendor/revisions.json @@ -1,18 +1,18 @@ { "v17": [ "17.4", - "22533c63fc42cdc1dbe138650ba1eca10a70c5d7" + "7ec41bf6cd92a4af751272145fdd590270c491da" ], "v16": [ "16.8", - "473f68210d52ff8508f71c15b0c77c01296f4ace" + "26c7d3f6de6f361c8923bb80d7563853b4a04958" ], "v15": [ "15.12", - "6cea02e23caa950d5f06932491a91b6af8f54360" + "4ac24a747cd897119ce9b20547b3b04eba2cacbd" ], "v14": [ "14.17", - "35bc1b0cba55680e3b37abce4e67a46bb15f3315" + "bce3e48d8a72e70e72dfee1b7421fecd0f1b00ac" ] }