Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tAt3c-000ez3-IT for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Nov 2024 15:43:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tAt3Z-007eMo-PA for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Nov 2024 15:43:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tAt3Z-007eMf-DV for pgsql-hackers@lists.postgresql.org; Tue, 12 Nov 2024 15:43:54 +0000 Received: from dd48506.kasserver.com ([85.13.164.188]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tAt3W-001YsM-O9 for pgsql-hackers@lists.postgresql.org; Tue, 12 Nov 2024 15:43:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oopsware.de; s=kas202409031116; t=1731426231; bh=Dt/OwmwjJK3oZs2rXxR461uRcYWDrjrNRJ3ORmEjA0A=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Xmlk8JWa1q/0sfqXjzJtka3bVCh41hA2JQ9ITzryIkiJHed+Db3WAB7iQbhVQBVdY hCDzKkv5cloucFqkwKvQ6g2LtWHG4Q613UkfXw9insctrolgYeRZbfNTqwbR+EsW2n ThUa/GGjLb4D8ssy6hd6+EZmvo5wfP7WmY3eRPqnlTcklxyaVLmaTPIVV/giSuxUJW QAG3ePkVvg+zIu6wCl6YPcUA5wu0MzwT2DGv0oQEMh7mnWvYR1tMMXEE0/PbwERE5p FWjagu4NE0fMGLf8erXARPva3o2gpSMNm8rjtPdbSux64a3gdJsoJX94ZGh14VPgb4 pzZuH48uwAlDg== Received: from sethos.at.struktu.ro (sethos.at.struktu.ro [46.4.183.126]) by dd48506.kasserver.com (Postfix) with ESMTPSA id F39588663C3A; Tue, 12 Nov 2024 16:43:50 +0100 (CET) Received: from chufu.bluecherstrasse.oopsware.lan (i5C7509AB.versanet.de [92.117.9.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sethos.at.struktu.ro (Postfix) with ESMTPSA id 907DF401191C; Tue, 12 Nov 2024 16:43:50 +0100 (CET) Message-ID: <0176b173adfcff250543fe0aee2ef6137bd71953.camel@oopsware.de> Subject: Re: [PATCH] Add sortsupport for range types and btree_gist From: Bernd Helmle To: "Andrey M. Borodin" Cc: jian he , PostgreSQL Hackers Date: Tue, 12 Nov 2024 16:43:50 +0100 In-Reply-To: <7095B5FA-FADB-4524-B858-ECD14998710B@yandex-team.ru> References: <437ccbcf-8f80-2919-411d-a3af88becf6c@cybertec.at> <77f4bacbeb9d223f90b3a0bd55ef7d65407bfddd.camel@oopsware.de> <2f2e88bf1d44d06c1baf27bbf3db880f42a5cb87.camel@oopsware.de> <31f23e46f71b744fb639967169d7df4c748110af.camel@oopsware.de> <7C9400DF-66FE-4308-BAD8-92FE3D0E55C6@yandex-team.ru> <0d9fbd59de15e2fc987a850c3d1f8a79a6ede825.camel@oopsware.de> <19c62e62c79b727d2c9a82eaeecfea5017001099.camel@oopsware.de> <4BADF8DD-A4D3-43AA-AA08-037F6FFA40BC@yandex-team.ru> <61128550659807032dd29c8c8a71674c818cbbb6.camel@oopsware.de> <7095B5FA-FADB-4524-B858-ECD14998710B@yandex-team.ru> Autocrypt: addr=mailings@oopsware.de; prefer-encrypt=mutual; keydata=mQGiBEIM4dYRBACEnxQZ/CfR1xbCJzGOIjvh3fZpLALMm+tt237QlZm9nlLaEwCn317sT 1khPAJwhyBHSHbNFbH+LOL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kZT6 IXgQTEQIAHgUCQhyPxgIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRBRdc2OhdlKzOhrAJ4w+A3H cjTJb54lUDpyyQu6Y5dlVQCeJCFKygOVbpn4HSp4Z+R6+s4Rul60J0Jlcm5kIEhlbG1sZSA8YmVyb mQuaGVsbWxlQGN5YmVydGVjLmF0Poh4BBMRAgA4FiEEcLVWcrwQIdBqHtvMUXXNjoXZSswFAmDe1D kCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQUXXNjoXZSszs9QCfbbpKT0/Mh4PhfS6rRbm NNQC1zS8An2x1PLHPS6649DRkiYOMWTXzAlSE Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.1 (3.54.1-1.fc41) MIME-Version: 1.0 X-Spamd-Bar: / List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Am Montag, dem 11.11.2024 um 23:03 +0500 schrieb Andrey M. Borodin: > Some nitpicking: > 0. postgres % git apply ~/Downloads/v7.3-Add-GIST-sortsupport-* > /Users/x4mmm/Downloads/v7.3-Add-GIST-sortsupport-btree-gist.patch:19: > space before tab in indent. I obviously shouldn't do patches after a long work day.... [...] >=20 > 1. I'm mostly seening patches formatted with `git patch-format` > rather than diffs as patches... >=20 Will do. > 2. Changes in contrib/btree_gist/btree_gist.c seem unnecessary. >=20 Agreed. Will fix > 3. Why do you move "typedef struct int32key" to btree_gist.h, but do > not need to move all other keys? >=20 Hmm, afair i did this back in an earlier stage of the patch and forgot about it. It needs to be moved back to btree_int4.c, will fix. > 4. These ifdedfs are not needed, just do INJECTION_POINT() > #ifdef USE_INJECTION_POINTS > INJECTION_POINT("btree-gist-sorted-build"); > #endif >=20 I never worked with injection points before, i copied that pattern from the docs somewhere, where those #ifdef's are used. Will fix. > Also, there are 61 occurance of this code. Why not just 1 in > gist_indexsortbuild() ? >=20 >=20 Right, but after thinking about this i'd even go further: naming the injection points for the sortsupport according to their datatype they're called on. That would connect the regression test with the specific datatype/sortsupport function and this would make sure the correct sortsupport function for the specific test case is called. Though that means that each test needs to attach/detach the injection point itself... What do you think? Thanks, Bernd