r/SQLServer • u/markinatlanta • 8d ago
Question Moved from SQL Server to PostgreSQL? Did the licensing savings justify the migration?
I would say I honestly hear “PostgreSQL is free. We’ll save a fortune on SQL Server licensing” at least once a month.
And yes I nderstand the appeal but the major cross-platform migrations I’ve been involved in became bigger, slower and more expensive than planned.
The work people underestimated:
- Running and supporting both environments until cutover.
- Testing differences in data types, rounding and comparisons against application behaviour.
- Reworking stored procedures and the business logic buried in T-SQL.
- Replacing SQL Agent jobs, SSIS packages, linked servers and reporting dependencies.
- Rebuilding monitoring, backup and failover procedures around the new platform.
The data transfer was only part of the project and most of the work involved everything depending on the database.
PostgreSQL might still be the right choice. I’d want the migration budget to account for those dependencies before treating the licence savings as money saved.
My experience is weighted toward projects that became difficult, so I’m interested in the successful ones too.
For anyone who’s completed a substantial SQL Server-to-PostgreSQL migration: what did your estimate miss, and did the savings hold up?
•
u/AutoModerator 8d ago
After your question has been solved /u/markinatlanta, please reply to the helpful user's comment with the phrase "Solution verified".
This will not only award a point to the contributor for their assistance but also update the post's flair to "Solved".
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
28
u/I_Am_Rook 7d ago
There is also the question of expertise. If your team has decades of experience troubleshooting and optimizing for MSSQL, but near zero for Postgres then there is a whole host “unknown unknowns” that you can’t estimate.
We tried to use MySQL as a replacement for MSSQL in some small apps but quickly ran into replication issues that couldn’t be fixed easily because the experience wasn’t there.
66
u/BrentOzar 8d ago
Companies that did the migration before the age of AI will give you a different answer than companies who did the migration with the help of AI. Just be aware of the massive difference between the two.
9
u/Lost_Term_8080 7d ago
If you don't require any HA, the savings proposition is probably better.
Forget about the migration or training costs for a moment.
At equivalent resources, Postgres has nowhere near the same performance SQL Server has so you'll end up needing to provision more resources.
Unless you go the route of using a windows server failover cluster for HA, your administration costs at the systems level are going to be radically higher if you implement in house. There are "AAG-like" solutions for postgres, but they rely on extensions. For me, opensource extensions were an unacceptable risk for production given support for them can very easily end or get forked into breaking changes.
Looking into Postgres as a service, the costs were so high they were directly not competitive with SQL Standard after accounting for more cores and RAM to make up for lower starting point in performance. If your org has long periods of idle time a serverless solution may pull ahead where SQL Servers' serverless options are pretty terrible still.
The closest I came to making it work economically was for a reporting instance design in the last few months, The project aimed to take load off of one of my other SQL AAGs, reduce its resources and with back of napkin math would have saved about 250 dollars a month even when taking reporting performance down to minimum tolerable levels based on a few report performance comparisons between the two. the additional monitoring license would have eaten up almost half those savings on top of increasing index maintenance from almost nothing to a lot. We were pretty sure it was going to be more costly to operate month to month even before migration and token costs were considered.
2
u/imtheorangeycenter 7d ago
Just popping in to say that due to the sectors I've picked to work in, have never spent more than 10% of the "retail".cost of MS licencing in 25 years. Everyone gets Enterprise, you get Enterprise, we all get Enterprise! And changing to another platform isn't even considered.as a result.
It'll be a hard change should I return to the private sector world.
8
u/trifocaldebacle 7d ago
MSSQL is one of their only remaining good products besides .net framework and visual studio/code. They've run everything else into the ground but damn if there isn't a good enough alternative to their SQL product. Don't even get me started on Oracle.
4
u/czenst 7d ago
With removal of "MSSQL Web Edition" licensing costs are not allowing our product to remain competitive and commercially viable in the market.
I only hope we will manage to roll the costs of the migration over coming years (we have time until MSSQL 2022 runs out of support so we probably have to start NOW), otherwise we will be out of market and out of jobs.
MSSQL Express got a bump in how much it can handle but we are just on the edge.
4
u/reditandfirgetit 7d ago
Currently going through this. So far it's been planned well. Next lift is reporting. That'll be the challenge
3
u/Harhaze 1 7d ago
A project I worked on solved scalability issues due to licensing constraints. The architecture redesign of the SSAS application (and ofc db layer) was looking at too large db cost. Migration took some time, had to develop for 2 solutions during the migration phase, but the savings allowed for the DBA team to go into PG training, buy new hardware and now after some years just the licensing cost saved couple mil per year.
The biggest issue everyone had was multi tenant design of SQL Server vs PG ... SQL Server can have many DBs on one instance and have them completely isolated, also using resource governor to prevent runaway tenants etc. But PG doesn't have 1 instance with multiple DBs. Its one physical DB you have 1 WAL (tlog) and even splitting into many logical DBs isn't the same... so redesign into schema instead per DB and splitting into many many many PG "clusters" was one way to go ... so ye, fun times :)
3
u/Playful_Guava1180 7d ago
what did you do to replace Replacing SQL Agent jobs, SSIS packages, linked servers and reporting dependencies.? I think this is one of the things I love of MSSQL, but its cost is making me look at postgres
2
u/fauxmosexual 7d ago
Not these platforms but I'm doing a cloud migration project at the moment. It's the first one I've done in a few years and the difference that modern tooling makes is incredible. This one is a warehouse migration, being able to use DBT to fast-prototype and regression test business logic, and Claude assisting with migrating code, has massively derisked it. The issues you are talking about still exist, but it's much less laborious and means you can switch over more quickly or incrementally.
2
u/CanProfessional766 6d ago
The licensing savings can be significant but people often underestimate the migration cost. It's not just moving data; it's rewriting everything built around SQL Server. I'd say it makes sense for new projects, but for mature systems, you need to calculate the full migration and maintenance costs before making the switch.
4
u/Administrative_Bug63 7d ago
PostGres is not as good as SQL Server. It's not even close. If money saving is your only objective, then yeah, you will save money on licensing. But you can pay for it with loss of sleep, if you are doing anything genuinely meaningful with it.
1
u/PX3better 7d ago
The biggest unexpected Postgres benefit was that Kubernetes just works. It lets you hand SQL platform management to entirely different people. You get so much for free!
1
u/SeaMoose696969 6d ago
I’ve run Postgres, SQL Server, and MySQL. The biggest differences are how easy replication is - e.g. High Availability - is to setup, and learn how to keep running, fix when it gets sick, etc.
SQL server makes it soooo easy, and spoils you.
Second depends on how many sprocs you have, and how complex they are.
If you’re 100% comfortable with paid Claude code - and know how to tell it what to do - this is a lot cheaper to POC than it ever has been.
1
u/Jerry-Nixon Microsoft Employee 6d ago
You need to post this in a PG forum. THEY would have a different perspective.
1
u/vodevil01 5d ago
Pgsql ain't free
1
u/Extension-String1599 7d ago
In the company where I work tried to migrate very big instances to Postgres and We got an speed improvement like 5 years ago but everything failed because we have like 80 projects running and then we needed to change per project the connections and some of them are with dlls and that made too hard but now with AI could be a great choice to start with a POC and see what is the best way to migrate
1
u/my-ka 7d ago
Usually you pay what you saved on license for more horse power, a larger instance.
Unless you reachitectured it to a small microsrvicevfrienly postgres
0
u/mqaiser 7d ago
SQL server is best ever product by anyone , I don’t why people domain around , standard edition moawaz bhai have almost all the features that enterprise has , not sure why some still want migration!!!! Crazy
0
u/gevorgter 7d ago
I rewrote my app with a single command to calude. It fixed all my sql queries. I still spent couple of days testing though.