pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <rhodiumtoad@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Repair bug in regexp split performance improvements.
Date: Wed, 12 Sep 2018 18:56:02 +0000
Message-ID: <E1g0AJ0-0001Ac-4h@gemulon.postgresql.org> (raw)

Repair bug in regexp split performance improvements.

Commit c8ea87e4b introduced a temporary conversion buffer for
substrings extracted during regexp splits. Unfortunately the code that
sized it was failing to ignore the effects of ignored degenerate
regexp matches, so for regexp_split_* calls it could under-size the
buffer in such cases.

Fix, and add some regression test cases (though those will only catch
the bug if run in a multibyte encoding).

Backpatch to 9.3 as the faulty code was.

Thanks to the PostGIS project, Regina Obe and Paul Ramsey for the
report (via IRC) and assistance in analysis. Patch by me.

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a389ddc759ae26169f3b124f2b72eea44eaf292a

Modified Files
--------------
src/backend/utils/adt/regexp.c        | 16 ++++++++++------
src/test/regress/expected/strings.out | 18 ++++++++++++++++++
src/test/regress/sql/strings.sql      |  3 +++
3 files changed, 31 insertions(+), 6 deletions(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1g0AJ0-0001Ac-4h@gemulon.postgresql.org>
Permalink:  ../E1g0AJ0-0001Ac-4h@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1g0AJ0-0001Ac-4h@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: rhodiumtoad@postgresql.org
  Subject: Re: pgsql: Repair bug in regexp split performance improvements.
  In-Reply-To: <E1g0AJ0-0001Ac-4h@gemulon.postgresql.org>
  References: <E1g0AJ0-0001Ac-4h@gemulon.postgresql.org>

* 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