diff --git a/internal/db/runtime-store.test.ts b/internal/db/runtime-store.test.ts index de9867d5..7160a84a 100644 --- a/internal/db/runtime-store.test.ts +++ b/internal/db/runtime-store.test.ts @@ -154,6 +154,7 @@ test("postgres pool config makes HWLAB_CLOUD_DB_SSL_MODE authoritative over URL assert.deepEqual(required.ssl, { rejectUnauthorized: false }); assert.equal(new URL(required.connectionString).searchParams.get("sslmode"), "require"); + assert.equal(new URL(required.connectionString).searchParams.get("uselibpqcompat"), "true"); }); test("configured postgres runtime passes normalized pool config to pg", async () => { diff --git a/internal/db/runtime-store.ts b/internal/db/runtime-store.ts index e5f180c4..cc2af0b3 100644 --- a/internal/db/runtime-store.ts +++ b/internal/db/runtime-store.ts @@ -1356,6 +1356,7 @@ function normalizePostgresConnectionStringForSslMode(dbUrl, sslMode) { } if (sslMode !== "disable") { url.searchParams.set("sslmode", "require"); + url.searchParams.set("uselibpqcompat", "true"); } return url.toString(); }