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 1fIKvj-0007KU-MU for pgsql-general@arkaria.postgresql.org; Mon, 14 May 2018 21:22:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fIKvi-0007eB-EF for pgsql-general@arkaria.postgresql.org; Mon, 14 May 2018 21:22:50 +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 1fIKvi-0007e1-2u for pgsql-general@lists.postgresql.org; Mon, 14 May 2018 21:22:50 +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 1fIKvb-0006Q3-Ha for pgsql-general@postgresql.org; Mon, 14 May 2018 21:22:48 +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 w4ELMdgm006048; Mon, 14 May 2018 17:22:39 -0400 From: Tom Lane To: Adrian Klaver cc: Dominic Jones , pgsql-general@postgresql.org Subject: Re: 10.4 upgrade, function markings, and template0 In-reply-to: <275c6239-9308-0655-d47f-e37af264f139@aklaver.com> References: <20180514144244.fe352659f5085e209594f3ff@xmission.com> <5113.1526331745@sss.pgh.pa.us> <275c6239-9308-0655-d47f-e37af264f139@aklaver.com> Comments: In-reply-to Adrian Klaver message dated "Mon, 14 May 2018 14:10:25 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6046.1526332959.1@sss.pgh.pa.us> Date: Mon, 14 May 2018 17:22:39 -0400 Message-ID: <6047.1526332959@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Adrian Klaver writes: > On 05/14/2018 02:02 PM, Tom Lane wrote: >> 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). > Well what is nice about the news release is you can cut and past the > entire list of commands and do the updates en masse. It'd be nice to have some more-automated way of doing this type of correction. Ordinary scripting doesn't look very promising, because I don't see an easy way to deal with the need to connect to every database in the cluster; that seems to depend on a lot of local characteristics about usernames and authentication. Maybe it'd be worth building some sort of infrastructure that would allow this to be done at a lower level. It's not hard to imagine an autovacuum-like or bgworker-based thingy that could run around and apply a given SQL script in every database, bypassing the usual worries about authentication and connections-disabled databases. That seems like a lot of work for a need that only comes up once in awhile, but perhaps it'd have more applications than just catalog corrections. regards, tom lane