Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFAAM-00010u-KY for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Feb 2022 07:34:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nFAAK-0001gh-NS for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Feb 2022 07:34:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFAAK-0001gY-E5 for pgsql-hackers@lists.postgresql.org; Wed, 02 Feb 2022 07:34:56 +0000 Received: from hook.sigaev.ru ([93.180.27.50]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFAAH-00086V-Bm for pgsql-hackers@postgresql.org; Wed, 02 Feb 2022 07:34:55 +0000 Received: from [192.168.1.8] (128-72-215-18.broadband.corbina.ru [128.72.215.18]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: teodor) by hook.sigaev.ru (Postfix) with ESMTPSA id 28079B191F0; Wed, 2 Feb 2022 10:34:50 +0300 (MSK) Message-ID: Date: Wed, 2 Feb 2022 10:34:49 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: Pluggable toaster Content-Language: en-US To: Robert Haas Cc: pgsql-hackers References: <224711f9-83b7-a307-b17f-4457ab73aa0a@sigaev.ru> From: Teodor Sigaev In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > I agree ... but I'm also worried about what happens when we have > multiple table AMs. One can imagine a new table AM that is > specifically optimized for TOAST which can be used with an existing > heap table. One can imagine a new table AM for the main table that > wants to use something different for TOAST. So, I don't think it's > right to imagine that the choice of TOASTer depends solely on the > column data type. I'm not really sure how this should work exactly ... > but it needs careful thought. Right. that's why we propose a validate method (may be, it's a wrong name, but I don't known better one) which accepts several arguments, one of which is table AM oid. If that method returns false then toaster isn't useful with current TAM, storage or/and compression kinds, etc. -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/