Replies: 1 comment 1 reply
-
So the main difficulty here is that DuckDB only supports opening a duckdb database in one process if you want to do writes to the database: https://duckdb.org/docs/connect/concurrency.html#handling-concurrency Since postgres uses a one process for each of your connections, having multiple connections write to the same database is not possible without additional logic. There definitely are options to work around this duckdb limitation: One possibility would be to create a database per schema, and once a query is done writing to it it would re-open the database in read-only mode, and thus allow other connections to open it in read-only mode too. |
Beta Was this translation helpful? Give feedback.
-
DuckDB Table AM is only available with MotherDuck and for temporary tables:
I'd like to use it for storing unlogged tables.
At my company we have a Postgres based data warehouse built with dbt. The process is the following:
Intermediate tables are only queried to create other intermediate tables during dbt execution. We don't need those tables to survive a crash and so we mark them unlogged to avoid WAL overhead.
I understand supporting DuckDB storage on normal tables would be difficult as they'd need to provide the same crash recovery features as normal tables. But unlogged tables are more lax and having them would allow us to benefit from columnar and vectorized execution without any overhead.
Beta Was this translation helpful? Give feedback.
All reactions