You Need to Check Your PostgreSQL Version. Here’s How and Why

December 01, 2022

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

 

Command line 

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:

  1. Enter locate bin/postgres (for Mac) or which bin/postgres (for Linux)
  2. Locate the path to the binary folder, now displayed in the terminal (/usr/lib/postgresql…)
  3. Retype the full path as displayed in the terminal, with the added -V: /usr/lib/postgresql/10/bin/postgres -V
  4. Now you will see your current PostgreSQL server version

 

PSQL Shell

If you opt to retrieve your PostgreSQL version number via PostgreSQL shell: 

  1. Type the PostgreSQL prompt: sudo -u postgres psql
  2. 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.

Contact our team today!

 

Want to learn more about the full potential of Postgres and PostgreSQL installation? Check out our eBook “Find the Right PostgreSQL Cloud Service for You!”

Share this

Relevant Blogs

A Review of 4 Top PostgreSQL Books

When I first started looking into Postgres, there were very few books in bookstores (yes, those still existed - that was a long time ago) and the only online resource...
May 08, 2020