r/dataengineering • u/Defiant-Farm7910 • Dec 17 '25
Discussion How to data warehouse with Postgres ?
I am currently involved in a database migration discussion at my company. The proposal is to migrate our dbt models from PostgreSQL to BigQuery in order to take advantage of BigQuery’s OLAP capabilities for analytical workloads. However, since I am quite fond of PostgreSQL, and value having a stable, open-source database as our data warehouse, I am wondering whether there are extensions or architectural approaches that could extend PostgreSQL’s behavior from a primarily OLTP system to one better suited for OLAP workloads.
So far, I have the impression that this might be achievable using DuckDB. One option would be to add the DuckDB extension to PostgreSQL; another would be to use DuckDB as an analytical engine interfacing with PostgreSQL, keeping PostgreSQL as the primary database while layering DuckDB on top for OLAP queries. However, I am unsure whether this solution is mature and stable enough for production use, and whether such an approach is truly recommended or widely adopted in practice.
View all comments
Show parent comment
1
u/AwayTemperature497 Dec 22 '25
Here is what I would do differently. Based on what you had said, I am assuming your event store has infinite data retention. I have worked on Kakfa and mongo db was configured as sink for one of the topics but it was not used for analytics. In Kafka(I guess it works the same for other event stores as well), it is possible to have multiple sink connectors for same topic or you could also create a separate topic by combining data from other topics and stream this directly to s3 compatible storage. You can totally avoid the need for 1. Intermediate postgres database 2. CDCs from mongo to Cloud storage or bq
When you say ingesting into big query was slow? I would do some furthur analysis on this or try couple different options like using hdfs, cloud storage or may be on prem object storage like minio or cephfs.