You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Node v22, when I try to load an in memory database with {loadDataDir: <myfile.gzip>) where the file is a gzip file created from .dumpDataDir('gzip'), I get Error: File is corrupted.
When I unzip the file on the command line into a directory, and then load that directory with loadDataDir, it works fine.
If that's a known limitation, it would be nice to have it documented. Thanks!
To reproduce:
const db = new PGlite({ dataDir: databaseFilename, extensions: { cube, earthdistance } });
await db.waitReady;
// Add some tables and records
const savedDb = await db.dumpDataDir('gzip'); // Using 'none' instead works fine
writeFileSync(archiveFilename, Buffer.from(await savedDb.arrayBuffer()));
db.close();
And then:
const loadDataDir = new Blob([readFileSync(archiveFilename)]);
const db = new PGlite({ loadDataDir, extensions: { cube, earthdistance } });
The text was updated successfully, but these errors were encountered:
In Node v22, when I try to load an in memory database with {loadDataDir: <myfile.gzip>) where the file is a gzip file created from .dumpDataDir('gzip'), I get
Error: File is corrupted.
When I unzip the file on the command line into a directory, and then load that directory with loadDataDir, it works fine.
If that's a known limitation, it would be nice to have it documented. Thanks!
To reproduce:
And then:
The text was updated successfully, but these errors were encountered: