Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3P6d-0006yJ-24 for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Dec 2014 13:02:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y3P6c-0005QX-Hp for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Dec 2014 13:02:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y3P6b-0005QH-1W for pgsql-hackers@postgresql.org; Tue, 23 Dec 2014 13:02:29 +0000 Received: from hook.sigaev.ru ([93.180.27.50]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y3P6W-0006JX-Ao for pgsql-hackers@postgresql.org; Tue, 23 Dec 2014 13:02:28 +0000 Received: from xor.sai.msu.ru (unknown [185.12.152.254]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: teodor) by hook.sigaev.ru (Postfix) with ESMTPSA id 0CCF0B19198; Tue, 23 Dec 2014 16:02:22 +0300 (MSK) Message-ID: <549967DE.1030103@sigaev.ru> Date: Tue, 23 Dec 2014 16:02:22 +0300 From: Teodor Sigaev User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:34.0) Gecko/20100101 Firefox/34.0 SeaMonkey/2.31 MIME-Version: 1.0 To: Heikki Linnakangas , Pgsql Hackers Subject: Re: compress method for spgist - 2 References: <54907069.1030506@sigaev.ru> <54993A76.7050308@vmware.com> In-Reply-To: <54993A76.7050308@vmware.com> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.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 > Now that the input data type and leaf data type can be different, which one is > "attType"? It's the leaf data type, as the patch stands. I renamed that to > attLeafType, and went fixing all the references to it. In most places it's just > a matter of search & replace, but what about the reconstructed datum? In > freeScanStackEntry, we assume that att[Leaf]Type is the datatype for > reconstructedValue, but I believe assume elsewhere that reconstructedValue is of > the same data type as the input. At least if the opclass supports index-only scans. Agree with rename. I doubt that there is a real-world example of datatype which can be a) effectivly compressed and b) restored to original form. If so, why don't store it in compressed state in database? In GiST all compress methods uses one-way compress. In PostGIS example, polygons are "compressed" into bounding box, and, obviously, they cannot be restored. > > I think we'll need a separate SpGistTypeDesc for the input type. Or perhaps a > separate SpGistTypeDesc for the reconstructed value and an optional decompress > method to turn the reconstructedValue back into an actual reconstructed input > datum. Or something like that. I suppose that compress and reconstruct are mutual exclusive options. -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers