PostgreSQL is awesome
PostgreSQL is a fantastic piece of software.
It has been around for quite a while (since 1988!) and it has always been great, but its usage has really grown in the past decade. Not only it has long been popular in the startup scene, but I also have noticed that a lot of large enterprises are starting to abandon Oracle and moving to PostgreSQL, due to the move to cloud. And that is a good thing - Postgres is an excellent DBMS, robust and fast.
So why do I believe that it is awesome? Here are some of the reasons:
- it is free software - it does not cost anything to run and you can check out the code (which is really well written, by the way)
- it is extremely reliable and robust - the Write-Ahead Log implementation has been battle tested countless times and it works. Backups and replicas are built-in and support multiple different configurations, to cover many use cases.
- it follows the SQL Standard very well, better than commercial databases (i.e. there are no crazy things like empty string being the same as
- it is fast - not only when executing queries, where it has a lot of complex features such as partitioning, parallel execution and multiple different indexes types - but it also has a lot of amazing tricks when performing DDL. Fo exmaple, you can change the data type of a column without waiting for data to be rewritten, or recreate an index without blocking anything.
- it supports a ton of different index kinds. Some of the advanced index kinds can really help performances, when used correctly
- it is very extensible - there are a lot of extensions that you can load in the databases for a wide range of purposes, from GIS to foreign data wrappers to monitoring tools
- it supports full-text search, which can be very effective and simpler to use than ElasticSearch for many purposes
- it supports stored procedures and functions written in many different languages
PostgreSQL is offered as a managed service by various cloud providers, such as AWS, Azure and GCP. Generally you are charged only for the cpu, memory and storage used, since the software is free and does not require a license.
Of course, PostgreSQL is available for most opeating systems and also as a docker container.
In future posts, I will take look at how MVCC works, why it is such an important feature, and what vacumm means.