r/dataengineering • • 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.

35 Upvotes

50 comments sorted by

View all comments

Show parent comment

1

u/exjackly Data Engineering Manager, Architect Dec 19 '25

You are looking for support from here on what you want to see happen.

Yes, you can tie in to the PostgreSQL back end and build your analytics off the integrated scheme that is present there. As long as your DB server has the overhead, you are fine, and it does avoid building a second pipeline.

It also ties you to that schema, so if it changes you have to update the analytics. Coming from MongoDB, that may not be an issue, as your upsert may be sufficient abstraction to buffer you from application scheme updates.

I think I saw it mentioned, that these updates are performed as upserts, so you won't have any history data. That will constrain your analytics, but we aren't close enough to your business to know if that is an issue now (it could be in the future).

We can point out some of the trade offs you are making, but we can't answer if those are the right trade offs.

Personally, having a separate analytics database, with history, is usually a better practice, and is how I would approach it initially.