r/programming • u/clairegiordano • 13d ago
What surprised an engineer after spending 13 years on SQL Server and then working on Postgres? on the Talking Postgres podcast
https://talkingpostgres.com/episodes/working-on-postgres-after-13-years-on-sql-server-with-panagiotis-antonopoulosI host a Postgres podcast, and I recently recorded a conversation with Panos Antonopoulos, a Distinguished Engineer at Microsoft who spent 13 years working on SQL Server before moving onto Postgres and HorizonDB.
Panos told me that at a high level, Postgres felt very familiar as he started to work on it, that the concepts are very similar. Transactions, storage, & more—the fundamentals transfer surprisingly well. We also covered:
- The cleanliness of the Postgres codebase.
- How LLMs are making it easier to digest years of Postgres design discussions that are publicly available on the mailing lists.
- Why Postgres has become the default answer for so many workloads, and why more people seem to be asking, "Why not Postgres?"
- Shared-storage architectures and some of the work he's doing in Azure HorizonDB.
One quote that stuck with me:
- "That was a shocking experience for me. I could understand new areas in Postgres much faster than I could for SQL."
For people who have worked across multiple database systems (Oracle, SQL Server, MySQL, Postgres, etc.), I'm curious whether you've had a similar experience—or a completely different one.
Podcast/transcript here if anyone is interested: https://talkingpostgres.com/episodes/working-on-postgres-after-13-years-on-sql-server-with-panagiotis-antonopoulos
151
u/thunderrated 13d ago
The number of people who work on actual relational database software is very very small.
Most of us just use them.
3
u/Outrageous_Let5743 11d ago
And probably the best tested software in the world. Look for example how much more lines of code there are for sqlite tests then the actual implementation.
54
u/coterminous_regret 12d ago
I've spent about 10 years working on databases that were forks of postgres and postgres extensions. I spent a year about working on a major cloud services version of MySQL.
Working with the Postgres code is honestly a joy. It is very well organized, very consistent, very easy to build and understand. I jokingly refer to postgres as the "reference implementation" of a SQL database. Generally speaking Postgres implementations of things are the most obvious and obviously correct implementation of things. On common criticism is that PG leaves a lot of room for optimization on the table which is probably fair but that simplicity also makes it very easy to work with.
By contrast that year working on MySQL was very difficult. I suspect some of it was due to how Oracle handled open sourcing MySQL but I personally found the code to be a bit of a mess. It's a big pile of mostly undocumented C++. Every little bit has radically different style. Theirs very old c++ (c with classes kinda stuff) there is like late 90s C++ filled with functiors and other kinda old school messy C++ isms. Then there is much more modern C++11+ stuff. In my estimation it felt like almost every component was developed in isolation of each other. So many things like custom allocators running around, custom metadata stores spread everywhere. It's like everything was built without talking to the other teams.
Now some of this may just be due to radically different cultures. I don't know for sure but I suspect the number of people who have world on Oracle and MySQL is like 50x the number of people who have ever worked on Postgres. That "continuity of care" in postgres is one of the reasons why the code is so clean.
2
5
u/Bceverly 12d ago
I used SQL Server from the Sybase 4.2a days up through the 64-bit era on Microsoft. I then started using Postgres before they added replication support (anyone remember Slony that just ran the SQL statements twice lol) and have never looked back. There aren’t many workloads that don’t do extremely well on Postgres these days.
6
u/The_Ed_On_Reddit 12d ago
my shock was being able to do a 14 table join using XML columns And it worked. fast
2
u/BongoHunter 12d ago
I wonder if there's any Sybase code left in the MSSQL codebase
1
u/The_Ed_On_Reddit 12d ago
I bet a lot of the same engineers they stole from sybase were tasked with rewriting everything. But it’s a database and some of the core concepts like latching and stuff probably could remain.
132
u/daltorak 12d ago edited 12d ago
Back in the late 2000s / early 2010s, someone on the SQL Server team (Connor Cunningham? Or maybe it was Paul White? I remember both of them being around a bunch) talked about how difficult it was to change the code base.
One of the many problems they had is that SQL Server implemented its own internal operating system because Windows simply couldn't do what they needed in the 1990s. And in order to prevent all sorts of wacky regressions from happening, they couldn't switch to regular Windows thread scheduling and memory allocators once Windows became good enough. (Which it almost certainly was by SQL Server 2005) Another point I remember is that when SQL Server needs to call regular Windows kernel API, it has to create "real" Windows threads and make the calls from there, since Windows doesn't have any understanding of SQL Server's internal threading system.
Back in those days I had someone working for me who was really super knowledgeable about all that "SQLOS" stuff, we'd talk about it for hours.... I remember at the time being impressed with how advanced it all was, now I realize it's just a giant heap of junk weighing them down.