diff --git a/packages/core/src/storage/vectorStore/PGVectorStore.ts b/packages/core/src/storage/vectorStore/PGVectorStore.ts
index 822c4cc66685c3ef76dce4d91418b38aa5679b0c..74faa505520af696750936c9189cc52a6349c8ec 100644
--- a/packages/core/src/storage/vectorStore/PGVectorStore.ts
+++ b/packages/core/src/storage/vectorStore/PGVectorStore.ts
@@ -82,7 +82,9 @@ export class PGVectorStore implements VectorStore {
   private async getDb(): Promise<pg.Client> {
     if (!this.db) {
       try {
-        const { Client } = await import("pg");
+        const pg = await import("pg");
+        const { Client } = pg.default ? pg.default : pg;
+
         const { registerType } = await import("pgvector/pg");
         // Create DB connection
         // Read connection params from env - see comment block above