Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fIKc5-0005hl-Ra for pgsql-general@arkaria.postgresql.org; Mon, 14 May 2018 21:02:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fIKc4-0002mk-Az for pgsql-general@arkaria.postgresql.org; Mon, 14 May 2018 21:02:32 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fIKc3-0002ma-VW for pgsql-general@lists.postgresql.org; Mon, 14 May 2018 21:02:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fIKc1-0005ts-5X for pgsql-general@postgresql.org; Mon, 14 May 2018 21:02:30 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w4EL2P4d005114; Mon, 14 May 2018 17:02:25 -0400 From: Tom Lane To: Dominic Jones cc: pgsql-general@postgresql.org Subject: Re: 10.4 upgrade, function markings, and template0 In-reply-to: <20180514144244.fe352659f5085e209594f3ff@xmission.com> References: <20180514144244.fe352659f5085e209594f3ff@xmission.com> Comments: In-reply-to Dominic Jones message dated "Mon, 14 May 2018 14:42:44 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5112.1526331745.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 14 May 2018 17:02:25 -0400 Message-ID: <5113.1526331745@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Dominic Jones writes: > The PostgreSQL 10.4 upgrade involves changes to some function markings (= see release notes, E.1.2, second and third bullet points for specifics). O= ne way to make these changes is to use `ALTER FUNCTION` to change the func= tions in your existing databases. While this was mainly straightforward, I= 'm unclear on whether the `template0` database must be changed in this man= ner or if it is automatically updated when the upgrade is applied. The doc= umentation indicates that in general you shouldn't manually change the `te= mplate0` database. Yes, you'd need to fix it in template0 as well, or you risk subsequently-created databases not having the fix. See previous minor releases where we've given more painstaking detail about applying catalog corrections, e.g. 9.6.4: https://www.postgresql.org/docs/current/static/release-9-6-4.html I didn't bother with spelling it all out in full detail this time, which maybe was a mistake, but I felt that probably most users wouldn't need to bother with these changes at all (unlike the case where a catalog correction is security-related). regards, tom lane