Re: BUG #17884: gist_page_items() crashes for a non-leaf page of an index with non-key columns

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Alexander Lakhin <exclusion(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org, Andrey Borodin <amborodin86(at)gmail(dot)com>
Subject: Re: BUG #17884: gist_page_items() crashes for a non-leaf page of an index with non-key columns
Date: 2023-05-19 05:41:22
Message-ID: ZGcMAtZiHe2EUllk@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, May 18, 2023 at 04:16:24PM +0900, Michael Paquier wrote:
> The format output could be tweaked forever, so if there are arguments
> for more improvements, we could always discuss that later as adapted
> and the tests will be here to provide coverage. I am planning to
> apply and backpatch that down to v14 tomorrow.

Well, I have woken up on this one and using parentheses was still
confusing when I attached composite types into the INCLUDE clause, so
I have looked again at record_out() and hstore, and noted that the
part where we apply the double quotes to the values is actually ~15
lines. With that, it is easily possible to apply it to all the
values, giving a representation close to how rows display for a nice
result.

So, at the end, I have used that, reduced a bit the scope of the
tests, and applied the result down to 14. Note the trick with
regexp_replace() to avoid some issues I noticed with alignment when
using -m32 for the non-leaf page when using INCLUDE. The
documentation needed also a refresh to show the new output generated.
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Richard Guo 2023-05-19 07:34:47 Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)
Previous Message Thomas Munro 2023-05-18 22:15:24 Re: llvmjit.so: undefined symbol: LLVMBuildGEP Fedora 38