pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Tender Wang <tndrwang@gmail.com>
Cc: nicolas.maus@bertelsmann.de
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18692: Segmentation fault when extending a varchar column with a gist index with custom signal length
Date: Thu, 07 Nov 2024 21:05:48 -0500
Message-ID: <3534898.1731031548@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPpHfdvc1C4Q9LQ-x9SarnM14UcaqxvursrZWrQbF8r2CT9ghg@mail.gmail.com>
References: <18692-72ea398df3ec6712@postgresql.org>
	<3261639.1730912933@sss.pgh.pa.us>
	<CAPpHfdsedeW4qiF_Ky88u=+0Ep7ZGH5yBd47a-rueQ2_jh3Dhw@mail.gmail.com>
	<CAHewXN=eBAk2wMn00CCYqcqC-1UtCHBMxr0nREUp_Ch8XYSQEg@mail.gmail.com>
	<CAPpHfdvc1C4Q9LQ-x9SarnM14UcaqxvursrZWrQbF8r2CT9ghg@mail.gmail.com>

Alexander Korotkov <aekorotkov@gmail.com> writes:
> On Thu, Nov 7, 2024 at 8:47 AM Tender Wang <tndrwang@gmail.com> wrote:
>> Based on Tom's analysis, I  provide a POC patch. I'm not sure if it is right
>> to use DEFAULT_COLLATION_OID in the patch.

> Thank you.  But I'm not sure about DEFAULT_COLLATION_OID.

I don't quite trust that either.  But since we only care about
equality, wouldn't it be OK to use C_COLLATION_OID?

> Therefore, we can compare two text[] just with datumIsEqual().
> Attached patch implements this.

I think this is nonsense.  What about toasted datums, or even
just short-header ones?  The one coming from an on-disk tuple
is pretty likely to be short-header for plausible sizes of
the options, but the one we just constructed in memory will
not be.

			regards, tom lane





view thread (13+ messages)  latest in thread

Message-ID: <3534898.1731031548@sss.pgh.pa.us>
Permalink:  ../3534898.1731031548@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3534898.1731031548@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, aekorotkov@gmail.com, tndrwang@gmail.com, nicolas.maus@bertelsmann.de, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18692: Segmentation fault when extending a varchar column with a gist index with custom signal length
  In-Reply-To: <3534898.1731031548@sss.pgh.pa.us>

* 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