| From: | Andreas Karlsson <andreas(at)proxel(dot)se> |
|---|---|
| To: | Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Online PostgreSQL version() updates |
| Date: | 2026-04-01 11:35:46 |
| Message-ID: | 3922da25-1dbc-4780-92c3-c2460aecbed5@proxel.se |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2026-04-01 11:38:16 | Re: Adding REPACK [concurrently] |
| Previous Message | Julien Rouhaud | 2026-04-01 11:24:48 | Re: Online PostgreSQL version() updates |