pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix overly-strict assertions in spgtextproc.c.
5+ messages / 1 participants
[nested] [flat]

* pgsql: Fix overly-strict assertions in spgtextproc.c.
@ 2016-01-02 21:25  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2016-01-02 21:25 UTC (permalink / raw)
  To: pgsql-committers

Fix overly-strict assertions in spgtextproc.c.

spg_text_inner_consistent is capable of reconstructing an empty string
to pass down to the next index level; this happens if we have an empty
string coming in, no prefix, and a dummy node label.  (In practice, what
is needed to trigger that is insertion of a whole bunch of empty-string
values.)  Then, we will arrive at the next level with in->level == 0
and a non-NULL (but zero length) in->reconstructedValue, which is valid
but the Assert tests weren't expecting it.

Per report from Andreas Seltenreich.  This has no impact in non-Assert
builds, so should not be a problem in production, but back-patch to
all affected branches anyway.

In passing, remove a couple of useless variable initializations and
shorten the code by not duplicating DatumGetPointer() calls.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7157fe80f42476db249e062b4f6eef6a3994b234

Modified Files
--------------
src/backend/access/spgist/spgtextproc.c |   14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Fix overly-strict assertions in spgtextproc.c.
@ 2016-01-02 21:25  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2016-01-02 21:25 UTC (permalink / raw)
  To: pgsql-committers

Fix overly-strict assertions in spgtextproc.c.

spg_text_inner_consistent is capable of reconstructing an empty string
to pass down to the next index level; this happens if we have an empty
string coming in, no prefix, and a dummy node label.  (In practice, what
is needed to trigger that is insertion of a whole bunch of empty-string
values.)  Then, we will arrive at the next level with in->level == 0
and a non-NULL (but zero length) in->reconstructedValue, which is valid
but the Assert tests weren't expecting it.

Per report from Andreas Seltenreich.  This has no impact in non-Assert
builds, so should not be a problem in production, but back-patch to
all affected branches anyway.

In passing, remove a couple of useless variable initializations and
shorten the code by not duplicating DatumGetPointer() calls.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/701303590053e100aa3a4ea87ac498d7fe00243f

Modified Files
--------------
src/backend/access/spgist/spgtextproc.c |   14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Fix overly-strict assertions in spgtextproc.c.
@ 2016-01-02 21:25  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2016-01-02 21:25 UTC (permalink / raw)
  To: pgsql-committers

Fix overly-strict assertions in spgtextproc.c.

spg_text_inner_consistent is capable of reconstructing an empty string
to pass down to the next index level; this happens if we have an empty
string coming in, no prefix, and a dummy node label.  (In practice, what
is needed to trigger that is insertion of a whole bunch of empty-string
values.)  Then, we will arrive at the next level with in->level == 0
and a non-NULL (but zero length) in->reconstructedValue, which is valid
but the Assert tests weren't expecting it.

Per report from Andreas Seltenreich.  This has no impact in non-Assert
builds, so should not be a problem in production, but back-patch to
all affected branches anyway.

In passing, remove a couple of useless variable initializations and
shorten the code by not duplicating DatumGetPointer() calls.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/1cd38408ba4e851eeccff6ffbba049a7a916c4e1

Modified Files
--------------
src/backend/access/spgist/spgtextproc.c |   14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Fix overly-strict assertions in spgtextproc.c.
@ 2016-01-02 21:25  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2016-01-02 21:25 UTC (permalink / raw)
  To: pgsql-committers

Fix overly-strict assertions in spgtextproc.c.

spg_text_inner_consistent is capable of reconstructing an empty string
to pass down to the next index level; this happens if we have an empty
string coming in, no prefix, and a dummy node label.  (In practice, what
is needed to trigger that is insertion of a whole bunch of empty-string
values.)  Then, we will arrive at the next level with in->level == 0
and a non-NULL (but zero length) in->reconstructedValue, which is valid
but the Assert tests weren't expecting it.

Per report from Andreas Seltenreich.  This has no impact in non-Assert
builds, so should not be a problem in production, but back-patch to
all affected branches anyway.

In passing, remove a couple of useless variable initializations and
shorten the code by not duplicating DatumGetPointer() calls.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/2917155d5805f16584e323b8764fd01b4023361a

Modified Files
--------------
src/backend/access/spgist/spgtextproc.c |   14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Fix overly-strict assertions in spgtextproc.c.
@ 2016-01-02 21:25  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2016-01-02 21:25 UTC (permalink / raw)
  To: pgsql-committers

Fix overly-strict assertions in spgtextproc.c.

spg_text_inner_consistent is capable of reconstructing an empty string
to pass down to the next index level; this happens if we have an empty
string coming in, no prefix, and a dummy node label.  (In practice, what
is needed to trigger that is insertion of a whole bunch of empty-string
values.)  Then, we will arrive at the next level with in->level == 0
and a non-NULL (but zero length) in->reconstructedValue, which is valid
but the Assert tests weren't expecting it.

Per report from Andreas Seltenreich.  This has no impact in non-Assert
builds, so should not be a problem in production, but back-patch to
all affected branches anyway.

In passing, remove a couple of useless variable initializations and
shorten the code by not duplicating DatumGetPointer() calls.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/5c0d6230f54c97c3fa5cf9a7cc286c35ebaad766

Modified Files
--------------
src/backend/access/spgist/spgtextproc.c |   14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2016-01-02 21:25 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-01-02 21:25 pgsql: Fix overly-strict assertions in spgtextproc.c. Tom Lane <tgl@sss.pgh.pa.us>
2016-01-02 21:25 pgsql: Fix overly-strict assertions in spgtextproc.c. Tom Lane <tgl@sss.pgh.pa.us>
2016-01-02 21:25 pgsql: Fix overly-strict assertions in spgtextproc.c. Tom Lane <tgl@sss.pgh.pa.us>
2016-01-02 21:25 pgsql: Fix overly-strict assertions in spgtextproc.c. Tom Lane <tgl@sss.pgh.pa.us>
2016-01-02 21:25 pgsql: Fix overly-strict assertions in spgtextproc.c. Tom Lane <tgl@sss.pgh.pa.us>

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