pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org, Andrey Borodin <amborodin86@gmail.com>
Subject: Re: BUG #17884: gist_page_items() crashes for a non-leaf page of an index with non-key columns
Date: Fri, 19 May 2023 14:41:22 +0900
Message-ID: <ZGcMAtZiHe2EUllk@paquier.xyz> (raw)
In-Reply-To: <ZGXQyOYez0lWgBwL@paquier.xyz>
References: <17884-cb8c326522977acb@postgresql.org>
	<92873f8d-a9b1-0ee8-5753-ee4a1664fb0e@gmail.com>
	<ZGF/qgICp6JvNDhV@paquier.xyz>
	<8a991814-97c0-81d6-1e24-60c26308f005@gmail.com>
	<ZGRk3LVBpt9/dFlt@paquier.xyz>
	<e4c9897a-6864-4c47-f7ea-08385f2a7db5@gmail.com>
	<ZGWEZCN0PpfFona0@paquier.xyz>
	<ZGWjHcBJoOPIbzYY@paquier.xyz>
	<457826a7-95a6-96ae-dabc-6e07d8020a7b@gmail.com>
	<ZGXQyOYez0lWgBwL@paquier.xyz>

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

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (11+ messages)

Message-ID: <ZGcMAtZiHe2EUllk@paquier.xyz>
Permalink:  ../ZGcMAtZiHe2EUllk@paquier.xyz/
Also on:    postgresql.org/message-id/ZGcMAtZiHe2EUllk@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, exclusion@gmail.com, amborodin86@gmail.com
  Subject: Re: BUG #17884: gist_page_items() crashes for a non-leaf page of an index with non-key columns
  In-Reply-To: <ZGcMAtZiHe2EUllk@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox