PostgreSQL releases are in the air. On October 13th, the latest major version of PostgreSQL, Postgres 15, was officially released. With this announcement came a bevy of exciting features designed to empower PostgreSQL veterans and newcomers alike—including the long-awaited MERGE command, which EDB leaders personally worked on. This makes PostgreSQL easier for the day-to-day PostgreSQL user and developers who use this command for other database systems to add PostgreSQL to their developer skill set.
Each new version of PostgreSQL brings a wave of powerful innovations and exciting capabilities. As a result, those businesses most invested in ongoing infrastructure modernization and application development make it a priority to ensure they’re running the latest version of PostgreSQL.
Are you doing the same?
Read on to get a walkthrough of how to check PostgreSQL version types and understand why you should be running the latest.
How to check your PostgreSQL version
There are a number of ways to check what PostgreSQL database version your database is running, the two most popular being:
- Via PSQL Command Line
- Via SQL Shell
If you opt to use command line to check your PostgreSQL version, you need to access your terminal and enter one of the two following code options:
- postgres --version
- postgres -V
Once you’ve entered this code, your PostgreSQL version number should display in the terminal window.
If, with either of these command lines, you see the “Command ‘postgres’ not found” message, you will need to locate the PostgreSQL binary folder via the correct postgres path.
To do so:
- Enter locate bin/postgres (for Mac) or which bin/postgres (for Linux)
- Locate the path to the binary folder, now displayed in the terminal (/usr/lib/postgresql…)
- Retype the full path as displayed in the terminal, with the added -V: /usr/lib/postgresql/10/bin/postgres -V
- Now you will see your current PostgreSQL server version
If you opt to retrieve your PostgreSQL version number via PostgreSQL shell:
- Type the PostgreSQL prompt: sudo -u postgres psql
- Type: SELECT version();
Why do you need the latest version of PostgreSQL?
So, you’ve figured out what PostgreSQL database version you’re running—what next?
Well, unless you’re running the latest version, it’s time to start planning for an upgrade.
Some organizations view upgrading PostgreSQL as a needless hassle. After all, their database is working perfectly for them—why risk long periods of downtime just to get a new version of something that’s working fine as is?
But these enterprises quickly learn that it’s not that simple. For businesses looking to grow, scale and innovate, regularly upgrading PostgreSQL is a necessity.
London & Partners takes full advantage of the cloud, all thanks to a PostgreSQL upgrade
Recently, EDB had the pleasure of working on a PostgreSQL project with London & Partners—a social enterprise funded by the mayor of London and commercial partners, and the first organization to bring together tourism and convention outreach.
In order to enhance the capabilities of their website, London & Partners was looking to embark on a major cloud migration. During the planning stage, however, EDB realized that by remaining on PostgreSQL version 9.1, the organization was both limiting its ability to leverage the full power of their future cloud database, and leaving themselves vulnerable to easily avoidable security risks.
After an in-depth consultation, London & Partners opted to undertake a multi-version PostgreSQL upgrade—from version 9.1 to 12—supported by EDB, with no disruption to their migration.
As for any fear of problematic downtime while upgrading: “With the help of EDB, we successfully executed our upgrade without even a moment of disruption,” said Nuria Cadavid Somoza, senior software development manager at London & Partners.
EDB ensures a seamless PostgreSQL upgrade
As both a builder of PostgreSQL and the largest contributor of major features, EDB has had a front-row seat for the evolution of this remarkable PostgreSQL database project. We’ve worked with the PostgreSQL community to empower developers, IT managers, DBAs and more—all in service of creating the best possible database management system (DBMS) and the most transformative open data source technology since Linux.
We strive to help enterprises dedicated to innovation take full advantage of what their PostgreSQL and open source strategy can be, with every subsequent version. Whether it’s advising on new features, providing enterprise-grade support or shepherding businesses through major infrastructural projects, EDB has distinguished itself as the PostgreSQL leader.
No matter what PostgreSQL version you’re on or what version you want to reach as part of your database management system, EDB is here to guide you. Let us upgrade PostgreSQL and upgrade your business to maximize your PostgreSQL potential as an enterprise.