From 3a2e6a03bcea27c0703b9af991d001c543bdb9ec Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Sat, 23 Sep 2023 16:47:57 +0100 Subject: [PATCH] Forbid installation of `hnsw` extension (#5346) ## Problem Do not allow new installation of deprecated `hnsw` extension. The same approach as in https://github.com/neondatabase/neon/pull/5345 ## Summary of changes - Remove `trusted = true` from `hnsw.control` - Remove `hnsw` related targets from Makefile --- Makefile | 15 --------------- pgxn/hnsw/hnsw.control | 1 - 2 files changed, 16 deletions(-) diff --git a/Makefile b/Makefile index 0a1d1f0d43..33b5dcad99 100644 --- a/Makefile +++ b/Makefile @@ -153,18 +153,6 @@ neon-pg-ext-%: postgres-% -C $(POSTGRES_INSTALL_DIR)/build/neon-utils-$* \ -f $(ROOT_PROJECT_DIR)/pgxn/neon_utils/Makefile install -# pg_embedding was temporarily released as hnsw from this repo, when we only -# supported PostgreSQL 14 and 15 -neon-pg-ext-v14: neon-pg-ext-hnsw-v14 -neon-pg-ext-v15: neon-pg-ext-hnsw-v15 - -neon-pg-ext-hnsw-%: postgres-headers-% postgres-% - +@echo "Compiling hnsw $*" - mkdir -p $(POSTGRES_INSTALL_DIR)/build/hnsw-$* - $(MAKE) PG_CONFIG=$(POSTGRES_INSTALL_DIR)/$*/bin/pg_config CFLAGS='$(PG_CFLAGS) $(COPT)' \ - -C $(POSTGRES_INSTALL_DIR)/build/hnsw-$* \ - -f $(ROOT_PROJECT_DIR)/pgxn/hnsw/Makefile install - .PHONY: neon-pg-ext-clean-% neon-pg-ext-clean-%: $(MAKE) PG_CONFIG=$(POSTGRES_INSTALL_DIR)/$*/bin/pg_config \ @@ -179,9 +167,6 @@ neon-pg-ext-clean-%: $(MAKE) PG_CONFIG=$(POSTGRES_INSTALL_DIR)/$*/bin/pg_config \ -C $(POSTGRES_INSTALL_DIR)/build/neon-utils-$* \ -f $(ROOT_PROJECT_DIR)/pgxn/neon_utils/Makefile clean - $(MAKE) PG_CONFIG=$(POSTGRES_INSTALL_DIR)/$*/bin/pg_config \ - -C $(POSTGRES_INSTALL_DIR)/build/hnsw-$* \ - -f $(ROOT_PROJECT_DIR)/pgxn/hnsw/Makefile clean .PHONY: neon-pg-ext neon-pg-ext: \ diff --git a/pgxn/hnsw/hnsw.control b/pgxn/hnsw/hnsw.control index 24510f6766..fbfa1a5b47 100644 --- a/pgxn/hnsw/hnsw.control +++ b/pgxn/hnsw/hnsw.control @@ -2,4 +2,3 @@ comment = '** Deprecated ** Please use pg_embedding instead' default_version = '0.1.0' module_pathname = '$libdir/hnsw' relocatable = true -trusted = true