public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ashutosh Bapat <[email protected]>
To: Matthias van de Meent <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Online PostgreSQL version() updates
Date: Wed, 1 Apr 2026 16:47:07 +0530
Message-ID: <CAExHW5v0Q7Ti=aKtJe2VfBkJAneNU1nmpb9kvc91_sZYTs=80w@mail.gmail.com> (raw)
In-Reply-To: <CAEze2WjgxD-uZrjiD7Gtp2gy=ztAOTU+xyLNJg6saYG4erP_=w@mail.gmail.com>
References: <CAEze2WjgxD-uZrjiD7Gtp2gy=ztAOTU+xyLNJg6saYG4erP_=w@mail.gmail.com>
Hi Matthias,
On Wed, Apr 1, 2026 at 4:18 PM Matthias van de Meent
<[email protected]> wrote:
>
> Hi,
>
> March has gone and passed, and the feature freeze for 19 is on the
> horizon; which also means it's time for users to start thinking about
> version updates.
>
> One of the greatest complaints people have about PostgreSQL is that
> they can't update its version() without at least some downtime being
> involved, either due to failovers or because their postmaster needs to
> be restarted. Updating to a new major version() is often
> time-consuming, complicated, and may involve moving terabytes of data;
> sometimes with no practical methods to avoid this.
>
> Until now.
>
> Attached is a patch that allows superusers to update the version() of
> their running system with a simple SQL call: SELECT
> pg_update_version(version_num, 'version_short', 'the full version()
> outout'). Running backends will automatically get updated without
> impacting their active workloads, and new backends will immediately
> notice the new version().
Thanks a lot for providing such useful functionality in such a short
time and with a tiny patch.
This happened to be the 41st unread email in my inbox, so I was
compelled to review the patch and respond.
>
> $ SELECT pg_update_version(40100, '4.1', 'PostgreSQL 4.1 compatibility
> edition');
I thought the last two zeros should be replaced by 2 and 6 respectively.
> $ SHOW server_version;
> '4.1'
> $ SHOW server_version_num;
> '40100'
> $ SELECT version();
> 'PostgreSQL 4.1 compatibility edition'
> $ \c
> psql (19devel, server 4.1)
> WARNING: psql major version 19, server major version 4.1.
> Some psql features might not work.
> You are now connected to database "postgres" as user "posgres".
The patch LGTM.
--
Best Wishes,
Ashutosh Bapat
view thread (8+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Online PostgreSQL version() updates
In-Reply-To: <CAExHW5v0Q7Ti=aKtJe2VfBkJAneNU1nmpb9kvc91_sZYTs=80w@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox