Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axecC-0008SV-2K for pgsql-hackers@arkaria.postgresql.org; Tue, 03 May 2016 18:00:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1axecB-0005wJ-Kw for pgsql-hackers@arkaria.postgresql.org; Tue, 03 May 2016 18:00:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1axeao-0001fp-TV for pgsql-hackers@postgresql.org; Tue, 03 May 2016 17:58:42 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1axeal-0004lS-VD for pgsql-hackers@postgresql.org; Tue, 03 May 2016 17:58:42 +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 u43HwaUC019749; Tue, 3 May 2016 13:58:36 -0400 From: Tom Lane To: Andres Freund cc: pgsql-hackers@postgresql.org Subject: Re: ALTER TABLE lock downgrades have broken pg_upgrade In-reply-to: <20160503174457.p6exbeehmfmgml3w@alap3.anarazel.de> References: <8110.1462291671@sss.pgh.pa.us> <20160503174457.p6exbeehmfmgml3w@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Tue, 03 May 2016 10:44:57 -0700" Date: Tue, 03 May 2016 13:58:36 -0400 Message-ID: <19748.1462298316@sss.pgh.pa.us> X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andres Freund writes: > On 2016-05-03 12:07:51 -0400, Tom Lane wrote: >> I think possibly the easiest fix for this is to have pg_upgrade, >> instead of RESETting a nonexistent option, RESET something that's >> still considered to require AccessExclusiveLock. "user_catalog_table" >> would work, looks like; though I'd want to annotate its entry in >> reloptions.c to warn people away from downgrading its lock level. > Alternatively we could just add a function for adding a toast table - > that seems less hacky and less likely to be broken in the future. We used to have an explicit "ALTER TABLE CREATE TOAST TABLE", IIRC, but we got rid of it. In any case, forcible creation is not what we're after here, we just want to create it if needs_toast_table() thinks we need one. I'm fine with it being a hack, as long as we have test coverage so we notice when somebody breaks the hack. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers