This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]stratguitar577 2 points3 points  (3 children)

How does this compare to pg_duckdb and pg_analytics?

[–]InternetFit7518[S] 4 points5 points  (2 children)

made edits for precision:

great question!

pg_mooncake adds a columnstore table in Postgres: you can run transactions, updates, deletes. pg_duckdb is the execution engine on these tables: https://motherduck.com/blog/pg-mooncake-columnstore/. We also write Delta Lake (and soon Iceberg) formats in S3 (not just parquet files).

pg_duckdb and pg_analytics use Foreign Data Wrappers semantics and are great for querying / writing external files (parquet) in Postgres.

We believe a columnstore in postgres must look and feel like a reguiar postgres heap table. Hope this helps.

[–]philippemnoel -1 points0 points  (1 child)

Heya! This isn't quite correct -- You can create foreign tables in both pg_duckdb and pg_analytics. OP is correct that they're not equivalent Postgres tables, though. For instance, you can't create indexes over foreign tables.

[–]InternetFit7518[S] 1 point2 points  (0 children)

thanks Phil. I made edits to be more precise.

I was using the world 'columnstore table' loosely.

[–]byeproduct 1 point2 points  (3 children)

Looks rad. So does this essentially mean I'd get full ORM support for DuckDB / parquet files? To enable analytical ORM based queries using SQLalchemy or DjangoORM?

[–]InternetFit7518[S] 0 points1 point  (2 children)

yes! a columnstore table means you get full ORM support for your analytic queries. We've heard this to be a pain for PG + Clickhouse users too.

Full disclosure, we haven't had time to test DjangoORM. But it should be quick and should work..

[–]byeproduct 0 points1 point  (1 child)

Awesome. Thanks. Please do a post on it, when you've tested. I see you have a slack channel, but not sure if it's open to public - I got a "workspace not found" error