public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andreas Karlsson <[email protected]>
To: Matthias van de Meent <[email protected]>
To: PostgreSQL Hackers <[email protected]>
Subject: Re: Online PostgreSQL version() updates
Date: Wed, 1 Apr 2026 13:35:46 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAEze2WjgxD-uZrjiD7Gtp2gy=ztAOTU+xyLNJg6saYG4erP_=w@mail.gmail.com>
References: <CAEze2WjgxD-uZrjiD7Gtp2gy=ztAOTU+xyLNJg6saYG4erP_=w@mail.gmail.com>
On 4/1/26 12:48 PM, Matthias van de Meent wrote:
> 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 for the patch!
Some small quibbles:
- The NULL checks for arguments to pgsql_update_version() should say
which field contained a NULL value.
- The error message for the superuser check should be something like
"must be superuser to perform online version updates"
- The error messages for the version length checks could be imrpoved,
e.g. by saying how long it was comapred to the limit which was hit.
- There is a copy pasto in the second length check. Surely
versionCtl->size in the detail should be PG_CACHE_LINE_SIZE. Also I
wonder if detail shouldn't actually be a hint.
- Shouldn't GetCurrentVersionStr() be static? Or do you think it would
be useful for extensions?
- There is an accidental extra newline in the middle of
VersionCtlShmemInit().
- Maybe I am missing something but why do we need to size field at all
in PgVersionControl? Is this size known at compile time?
Thanks again for a great feature!
--
Andreas Karlsson
Percona
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: <[email protected]>
* 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