Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j8AMX-0007cQ-UX for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Feb 2020 22:13:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j8AMU-0001zD-Tv for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Feb 2020 22:13:30 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1j8AMU-0001z6-L9 for pgsql-hackers@lists.postgresql.org; Sat, 29 Feb 2020 22:13:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j8AMO-0007Wa-1r for pgsql-hackers@postgresql.org; Sat, 29 Feb 2020 22:13: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 01TMDJMw005430; Sat, 29 Feb 2020 17:13:19 -0500 From: Tom Lane To: Tomas Vondra cc: pgsql-hackers@postgresql.org Subject: Re: Allowing ALTER TYPE to change storage strategy In-reply-to: <20200229213714.7osohwlvup24ugd2@development> References: <20200228004440.b23ein4qvmxnlpht@development> <4872.1582916389@sss.pgh.pa.us> <20200229012511.7h23frunvvxwai7q@development> <9226.1582940133@sss.pgh.pa.us> <20200229213714.7osohwlvup24ugd2@development> Comments: In-reply-to Tomas Vondra message dated "Sat, 29 Feb 2020 22:37:14 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5428.1583014399.1@sss.pgh.pa.us> Date: Sat, 29 Feb 2020 17:13:19 -0500 Message-ID: <5429.1583014399@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tomas Vondra writes: > On Fri, Feb 28, 2020 at 08:35:33PM -0500, Tom Lane wrote: >> You'd need a moderately strong lock on each such table, which means >> there'd be serious deadlock hazards. I'm dubious that it's worth >> troubling with. > Yeah, I don't plan to do this in v1 (and I have no immediate plan to > work on it after that). But I wonder how is the deadlock risk any > different compared e.g. to DROP TYPE ... CASCADE? True, but dropping a type you're actively using seems pretty improbable; whereas the whole point of the patch you're proposing is that people *would* want to use it in production. regards, tom lane