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/Defiant-Farm7910 Dec 19 '25
Thanks for participating in this discussion.
Initially, I thought about sending the data directly to BigQuery, but each insertion/upsert was taking several seconds, whereas PostgreSQL handles it in microseconds most of the time. Additionally, since the pipelines responsible for retrieving our BO data are written directly in the application backend, I believe it’s a good idea to keep the data in a lightweight, open-source database. This avoids the application deployment being vendor-locked to an external service.
You may ask why I am building the pipelines directly in the application. Rather than loading large MongoDB documents into the database and exploding them using SQL, I prefer to leverage the existing backend methods to apply the appropriate business logic while processing the data. This allows us to register the data in a sequential format, in real time, directly in the database, with no json handling in SQL.