From fc4208b69a3de40542d77129f656553a91fb14e8 Mon Sep 17 00:00:00 2001 From: Lars Mennen <1162951+larsmennen@users.noreply.github.com> Date: Tue, 24 Feb 2026 08:41:07 +0000 Subject: [PATCH] Fix PostGIS loading to use async WASM precompilation --- hotfix/library_dylink.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hotfix/library_dylink.js b/hotfix/library_dylink.js index 8a44339b30670..7c5b843891479 100644 --- a/hotfix/library_dylink.js +++ b/hotfix/library_dylink.js @@ -1047,7 +1047,10 @@ var LibraryDylink = { function getExports() { #if FILESYSTEM // lookup preloaded cache first - var preloaded = preloadedWasm[libName]; + // Also try with .so suffix: pglite's extensionUtils.ts registers the module under the + // name with .so (so the wasm preload plugin's canHandle() fires), but PostgreSQL's + // dlopen() calls us with the name stripped of .so. + var preloaded = preloadedWasm[libName] || preloadedWasm[libName + '.so']; #if DYLINK_DEBUG dbg(`checking preloadedWasm: ${libName}: ${preloaded ? 'found' : 'not found'}`); #endif