Closed rebasedming closed 1 month ago
Now that the DuckDB database is on disk, how does this work with multiple Postgres connection processes accessing it simultaneously? My impression is that DuckDB needs to be in read-only mode to support multiple connections:
https://github.com/duckdb/duckdb/issues/1343 https://github.com/duckdb/duckdb/issues/40
If you feel like it's appropriate to add a test for this, you can make multiple instances of PgConnection in the test suite and try running queries with both.
Now that the DuckDB database is on disk, how does this work with multiple Postgres connection processes accessing it simultaneously? My impression is that DuckDB needs to be in read-only mode to support multiple connections:
duckdb/duckdb#1343 duckdb/duckdb#40
If you feel like it's appropriate to add a test for this, you can make multiple instances of PgConnection in the test suite and try running queries with both.
Great catch. I had missed this caveat but I now see it https://duckdb.org/docs/connect/concurrency.
Do you think a background worker would solve?
Ticket(s) Closed
What
CREATE FOREIGN TABLE
now has acache
option. If set to true, a DuckDB table instead of view is created. This stores the table in DuckDB format inside the Postgres data directory.Why
Enable caching for faster queries, sets us up for upserts later on.
How
Every Postgres database now creates a DuckDB database. Connections are opened against this database.
Tests