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 1j9zbb-00011y-3X for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Mar 2020 23:08:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j9zbZ-0002Py-Sp for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Mar 2020 23:08:37 +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 1j9zbZ-0002Pr-Ju for pgsql-hackers@lists.postgresql.org; Thu, 05 Mar 2020 23:08:37 +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 1j9zbT-00059b-6j for pgsql-hackers@postgresql.org; Thu, 05 Mar 2020 23:08:37 +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 025N8RwE014436; Thu, 5 Mar 2020 18:08:27 -0500 From: Tom Lane To: Tomas Vondra cc: pgsql-hackers@postgresql.org Subject: Re: Allowing ALTER TYPE to change storage strategy In-reply-to: <20200305211703.nxajetzvksjikwxc@development> References: <4872.1582916389@sss.pgh.pa.us> <20200229012511.7h23frunvvxwai7q@development> <9226.1582940133@sss.pgh.pa.us> <10968.1583176270@sss.pgh.pa.us> <20200302220531.cdz4rlbw5gmcicsa@development> <30065.1583347198@sss.pgh.pa.us> <14527.1583363728@sss.pgh.pa.us> <27393.1583366202@sss.pgh.pa.us> <20200305190513.y4j3ckkvpzrgiy2y@development> <17431.1583437964@sss.pgh.pa.us> <20200305211703.nxajetzvksjikwxc@development> Comments: In-reply-to Tomas Vondra message dated "Thu, 05 Mar 2020 22:17:03 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14434.1583449707.1@sss.pgh.pa.us> Date: Thu, 05 Mar 2020 18:08:27 -0500 Message-ID: <14435.1583449707@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tomas Vondra writes: > Yeah, I agree #1 seems like the cleanest/best option. Are you worried > about the overhead due to the extra complexity, or overhead due to > cache getting invalidated for this particular reason? The overhead is basically a hash_seq_search traversal over the typcache each time we get a pg_type inval event, which there could be a lot of. On the other hand we have a lot of inval overhead already, so this might not amount to anything noticeable. regards, tom lane