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 1pzWgO-00048V-5z for pgsql-bugs@arkaria.postgresql.org; Thu, 18 May 2023 06:00:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pzWgM-0002Rz-5w for pgsql-bugs@arkaria.postgresql.org; Thu, 18 May 2023 06:00:10 +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 1pzWgL-0002Rq-Te for pgsql-bugs@lists.postgresql.org; Thu, 18 May 2023 06:00:09 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pzWgG-000RCv-Ty for pgsql-bugs@lists.postgresql.org; Thu, 18 May 2023 06:00:08 +0000 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-4f380cd1019so2005967e87.1 for ; Wed, 17 May 2023 23:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684389603; x=1686981603; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=LdqJM/IfEzcAVA8wxnma524tinOosr3J++IHCc36RiY=; b=ZyzhIi+8X5amZlBF7UE6miXIIP2iRityYszgGvbioB+ZlBdcZAZWtBcjessJbQixWT bTtx/tgDO12wukCElG4r0t5qdSr4Rq29q1PZNpt9kMyGlkOZeyEVaGidRBZY9r0rPN3s VlhUnDRNvN5NGKl4+OX6+NnbF2LzeScyXFmoZ3tt4utkasiU3sZLfrGiY9DETWjJGBu5 /CcLRiWRWXGRdEICh9VXFR80V5nZtvc9GBjz7npxoYOlEVFod/IGLvTTWoKPMZXxiupL lK9NM34MGihPjjLBC/hzi/BHNNc2uJ7H1OC99Xl0MYHK5rTvRaVdxtLmJ5m5QQroVHct 6seA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684389603; x=1686981603; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LdqJM/IfEzcAVA8wxnma524tinOosr3J++IHCc36RiY=; b=RCE+IT77gmHDeKFBrNTOhluFZjU4W2+wZ74nGG0qatOAcGAUg7b0vGeguzmKnyh1ur 5ii+6EWgqv432GBpAMXDcfwkAURBZKNCb/xzcDGgiAuxqNl1FB2L0vEZI76QsXePYhjb md+tdKK7y3zPNWKl/Rq+E8uTM6+rf6hfgOvZ34e2/WkNq/9zM1/0rhHPYPp0chY6Jnec 9I5GkWWgHcAElUPRKFxMcySefb74i6twM/bPQdjf11ZgSFcbACh6pcC6hGhzp4zwg1AH dc8M0UC8IC/fa+O6qL2PBBjbVB5qjgqMl9IwJHQ74XBjQ7/n8WRgz4yLOZZGdTGJNa/M xJhw== X-Gm-Message-State: AC+VfDxfO36l5uEf9JKT/6/Klzl+s8cMnnYAFGPkCU5+CKM1amTJjFbr UKN/ve2+TO0BtsLTA8/3qvc= X-Google-Smtp-Source: ACHHUZ6WKp7tyrcVn6cV5c+sm95mJD8PqEvih30PZsS6MYV/hS5h82tquipGbiWz7qc8BV/x5KiZeQ== X-Received: by 2002:ac2:5ec5:0:b0:4dd:995b:feaa with SMTP id d5-20020ac25ec5000000b004dd995bfeaamr1019196lfq.24.1684389603011; Wed, 17 May 2023 23:00:03 -0700 (PDT) Received: from [1.0.0.7] ([81.23.166.126]) by smtp.gmail.com with ESMTPSA id j5-20020ac25505000000b004edbc0eb509sm137631lfk.16.2023.05.17.23.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 May 2023 23:00:02 -0700 (PDT) Message-ID: <457826a7-95a6-96ae-dabc-6e07d8020a7b@gmail.com> Date: Thu, 18 May 2023 09:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: BUG #17884: gist_page_items() crashes for a non-leaf page of an index with non-key columns Content-Language: en-US To: Michael Paquier Cc: pgsql-bugs@lists.postgresql.org, Andrey Borodin References: <17884-cb8c326522977acb@postgresql.org> <92873f8d-a9b1-0ee8-5753-ee4a1664fb0e@gmail.com> <8a991814-97c0-81d6-1e24-60c26308f005@gmail.com> From: Alexander Lakhin 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 18.05.2023 07:01, Michael Paquier wrote: > On Thu, May 18, 2023 at 10:50:28AM +0900, Michael Paquier wrote: >> I have expanded the tests to show how this applies for more data >> types, like point or integers. Any thoughts about the v5 attached? I like this version and think it's ready to launch. Thank you! I would suggest just two changes: more parenthesis -> more parentheses (isn't this the plural form?) Non-leaf pages have only the key attributes, and leaf pages have the included attributes. -> Non-leaf pages contain only the key attributes, and leaf pages contain the included attributes. (To avoid misreading as if there are some attributes of the pages.) > Two extra things that I had in mind, as long as I don't forget about > them.. We could have a logic closer to record_out(), and grab a copy > of it for this specific function (hstore does that, as one example), > but I cannot really get into this approach, it just does not seem > worth the complications compared to the use cases. Yeah, hstore_from_record() doesn't look simpler. For the moment, I see no reasons to use that approach. > Another thing would be to use separate bracket types to the groups of > values while still using parenthesis for the whole set of key and > included values, like: > (a1, a2) INCLUDE (a3, a4) = ([val1], [val2]) INCLUDE ([val3], [val4]) > > But I am not sure that we need this much complication, either. > Compared to the point of showing all the values from the GiST tuples, > tweaking the style is not interesting as pageinspect is for advanced > users. More opinions or ideas are welcome, of course. Yes, I had thought about adding "{}", too, but decided that this would arguably improve reading, but inarguably raise formalization questions. So I would leave "()" as done in v5. Best regards, Alexander