Re: Regex with > 32k different chars causes a backend crash

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Regex with > 32k different chars causes a backend crash
Date: 2013-04-03 15:41:03
Message-ID: 15444.1365003663@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> writes:
> On 03.04.2013 18:21, Tom Lane wrote:
>> Obviously Henry didn't think that far ahead. I agree that throwing
>> an error is the best solution, and that widening "color" is probably
>> not what we want to do. You want to fix that, or shall I?

> I can do it. I assume that Tcl has the same bug, so I'll submit a report
> there, too.

Yes, definitely.

It occurs to me that at some point it might be useful to convert "color"
to unsigned short, so that you could have 64K of them --- but we'd still
need the error check anyway, and there's no reason to tackle such a
change today. (This possible change is, however, another reason to not
want pg_trgm looking directly at the internals of the data structure...)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2013-04-03 15:58:00 Re: commit dfda6ebaec67 versus wal_keep_segments
Previous Message Gavin Flower 2013-04-03 15:34:34 Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)