Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w7tZc-005oNK-0j for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2026 11:17:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7tZa-00GxrC-28 for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2026 11:17:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w7tZa-00Gxr4-1C for pgsql-hackers@lists.postgresql.org; Wed, 01 Apr 2026 11:17:22 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w7tZY-0000000288o-49Vi for pgsql-hackers@lists.postgresql.org; Wed, 01 Apr 2026 11:17:21 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-486507134e4so76376945e9.0 for ; Wed, 01 Apr 2026 04:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775042240; cv=none; d=google.com; s=arc-20240605; b=PjDZBxZzRK2bOzhS0lLVJeeYkf/9WOM2cw2rAzrBLkXSdNxb9flAIF9zQFjYJnzqMI QuKCDm1+LoeQGhg90mS09xQKoZkEDPHIbVbO2zuMBru1bHWhqUuRCw7A+fa6JfGvFGoG Ur1EW3/bBR7cCMoQ+k/FxvyZ35QkhNs7wL00CUTrJDViJ4BHth6Ip0yAXffo14j54iR7 xic4E/1YRqfHS1/UTOn/TyKZMqHrtmJpUFqVyA6coZsQeYJHiyiH9OZV+Yw3iUghoqdH Xcomp4WFN7iW0R0NpUNTKyM3pP2M/idV6XKYMzwTsGFB0aWE06sYq/vKvcNPZhuA4rhf c0wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ZiqezIX1xVA4oOESJEV85vxqujkNZFZ9RKggLj+OFfA=; fh=K5f1Fix1TKYSB7VNyQZT+kSq3QN+GL6Af07fFPWrAUM=; b=BuztYEV044+5McF0Qch7YBU7tSg9mRdJd0Sg4YZueGfYMn32x89kiiM0FBxyHY2PG4 SNWMphpepS9nUzbCjnyxKuP/K6R+6q//bQSh72FNeN8bxdpn/8mQ7jhYvO29pS6VijeB 5mycamx9ZrQ+/dy7Swt9UfoBPYeCW94JuJm4S9XXJ7K2N7X+/fqDnZrnh6oBNZRE3S/G yCvEMKCyR2izYsOfirPHdxeEqm4pK4GmZE80/boj/ldZbxOWJnnl5xG/Ij8DmT2aE5OA ntao1dJQXTwM51HL0dBmPvISkalhHSUZra0x6jkS+1GgsbR9Yvkh4YsTzR+f/RTyJb5u yTzw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775042239; x=1775647039; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ZiqezIX1xVA4oOESJEV85vxqujkNZFZ9RKggLj+OFfA=; b=S6OUHZkyvy5ZASL0pvvMSW7CC89gKj1M5+SeuwMBhBUMziXaVVelrMG5l3I0LTWKcP QX4UW9FgUnhtL8tZx28P7lKBaBeWHp1+LdrMOwoZ//fh4zD0GbhlTozyGQs4oBlvdE+5 5WTxjJBJgVY/JmHZ8sVGYdfDJX3hUNfJ+yyRFtUMibyWhpOMlMN/Hi6vrv4DKMznuUVb 3k5LKXQtTnMdTQBj8AnySL6DQ/O1JHVO9JGO5atuJSNIHqvE7/3vLENkJ3FOz7Jb2FNU prnfs3MhDGGa6cD1GRgVlwkPiyekPz03pGMDS9cNCmHbvENJhBD8nYrPFf0KdnjdvRNb AFmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775042239; x=1775647039; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ZiqezIX1xVA4oOESJEV85vxqujkNZFZ9RKggLj+OFfA=; b=PlAqd0CzooajkDUqu1IOA6je7AChjuV+aUPI3i8Kl7Yc/vG0DWbHuc/tkY4GNSRFJ0 xfT/dTbxHeeSd4xMUt3UID2P2JOekmtTzYdZhZUQHrhaZvFHNU/kSX7jzspHbaTWsheJ EXH6064+u5NnIE42QPU4gOkBkkgXWNFhXeNDs1qBybYsLjrMEjp5ibMVDRDMZvp32AnG fcPnMdVVpfV2LfXsggB/+iMiXEyoIh+kT2PieEuFm31moBd2zheUx8FvSzxh6GXBMcOB QwHVvX6lHS0TlHRQoGOuxdYZd3gmVsblbR9SxlMQMX4JElGm9LzhwDTz6yVNA978o2a9 i1Jw== X-Gm-Message-State: AOJu0YxMBjObcxfL0TayUrrkFm+qs/aTGD03vaqMvJBibgmwEGFr3qve 7w65Kb706RTmU/pvZqqjws49bhQUVNDMpIc4mnmdsQjlYaj+JNyMRfrcd8du+58y6Pqpl36oydH jRM0OGJ+0R6cL3aI7oKTakDusb7ifZIvWqA== X-Gm-Gg: ATEYQzwbQ6P9ixKPx6VrwGljQ/VulsDjhrIB6JUdLXXWefV6Nv1ouVl7jJo0t8qRvwk uk4Ut7I92A2CWNl/keaTJBeGTbR7jh2+UD20uHvgwxQj/XERpJk3hyqtUTMsr47kgbLHvzEhewP xi57lRUf7wz+c8x2+UQDiZjU9oYsY559vwu3JSzQpR2lM8tbjDS/uCAemAABGs7cS95xUmnGSxa bQ/BkiNEA1BYtkU1iMJhrKhhvmy6UpVCSOnkx+OUnamS3VBDVuOmzMZbszVwauZV3Zna5Z4Izr0 6h7yFfemsdS+BJe2qKjwBNNmPAvLDvn4RscCM1ZEQy0QGb2A6HM= X-Received: by 2002:a05:600c:848d:b0:488:8185:e672 with SMTP id 5b1f17b1804b1-488835cceaamr57257355e9.30.1775042239367; Wed, 01 Apr 2026 04:17:19 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ashutosh Bapat Date: Wed, 1 Apr 2026 16:47:07 +0530 X-Gm-Features: AQROBzBn5-8_SfOdN-X1OD7HLt0Hnfb8rsdh7O8WTkhC0_3wjRuKF9j9hceiVvM Message-ID: Subject: Re: Online PostgreSQL version() updates To: Matthias van de Meent Cc: PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Matthias, On Wed, Apr 1, 2026 at 4:18=E2=80=AFPM Matthias van de Meent 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. --=20 Best Wishes, Ashutosh Bapat