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 1rfBQA-00G0eC-8I for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Feb 2024 04:19:55 +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 1rfBQ8-007htO-VC for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Feb 2024 04:19:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rfBPb-007e2j-Qj for pgsql-hackers@lists.postgresql.org; Wed, 28 Feb 2024 04:19:20 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rfBPP-001ggC-0s for pgsql-hackers@postgresql.org; Wed, 28 Feb 2024 04:19:18 +0000 Received: from [172.30.8.38] (unknown [172.30.8.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: a.lepikhov@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id D4F99E2112D; Wed, 28 Feb 2024 07:19:01 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1709093944; bh=cMzvygo5IhGmiQECVH6/StsfVWdGzTMCk7jSXBayubI=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=Th1s6vbOuK9U560dw3VL3YtuHWWEOtRu3aFSlLLv64Li+qUm5embnspt4OoPHwTC5 e0dtdB2rxroxnAOHosmgc4jJbXnJkXckot7ard4EuM+O0dTzLdcAC3k1vy1KHtMpX0 liIlxkypu/1b2QTEQ6sib5LI2xXTfeayYJgSHH646olOjgqNDjM+6MeyMfXL+mc0Mo xtPl8aTkMNsd3jt8suHAXoBdAxCOEYN7449rvfIxaHDRfFfMRqt/603FULGjc8y4g7 fi4XVpH/aQDqH9KcYDI6c82EfmQG7cD4S5ff2/gyy38Ej3E3+rq3DYhTzedYQRylTH /mhSRg6f/Kp8w== Message-ID: <11ee9c04-281f-43c8-a0ff-d481c1e01c09@postgrespro.ru> Date: Wed, 28 Feb 2024 11:18:59 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: POC, WIP: OR-clause support for indexes Content-Language: en-US To: Alena Rybakina , jian he Cc: Alexander Korotkov , Robert Haas , pgsql-hackers@postgresql.org, Peter Geoghegan , "Finnerty, Jim" , Marcos Pegoraro , teodor@sigaev.ru, Tomas Vondra , Peter Eisentraut , Ranier Vilela References: <567ED6CA.2040504@sigaev.ru> <7e11e27b-7ab9-4d59-af0a-a921861a9206@postgrespro.ru> <13ad923a-33df-4b44-9e00-c9323cd4c37d@postgrespro.ru> <1cf6b382-6e27-4268-9f2a-54ada66eb2eb@postgrespro.ru> <5f119769-ab11-4807-abcc-71d5dd914ea0@postgrespro.ru> <21088129-7cd3-424a-bcce-6a3427ba3276@postgrespro.ru> From: Andrei Lepikhov Organization: Postgres Professional 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 On 26/2/2024 11:10, Alena Rybakina wrote: > On 24.02.2024 14:28, jian he wrote: >> Hi. >> I wrote the first draft patch of the documentation. >> it's under the section: Planner Method Configuration >> (runtime-config-query.html) >> but this feature's main meat is in src/backend/parser/parse_expr.c >> so it may be slightly inconsistent, as mentioned by others. >> >> You can further furnish it. > > Thank you for your work. I found a few spelling mistakes - I fixed this > and added some information about generating a partial index plan. I > attached it. Thanks Jian and Alena, It is a good start for the documentation. But I think the runtime-config section needs only a condensed description of a feature underlying the GUC. The explanations in this section look a bit awkward. Having looked through the documentation for a better place for a detailed explanation, I found array.sgml as a candidate. Also, we have the parser's short overview section. I'm unsure about the best place but it is better when the server config section. What's more, there are some weak points in the documentation: 1. We choose constant and variable parts of an expression and don't require the constant to be on the right side. 2. We should describe the second part of the feature, where the optimiser can split an array to fit the optimal BitmapOr scan path. -- regards, Andrei Lepikhov Postgres Professional