pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix possible sorting error when aborting use of abbreviated keys
3+ messages / 1 participants
[nested] [flat]

* pgsql: Fix possible sorting error when aborting use of abbreviated keys
@ 2016-08-22 19:33  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Robert Haas @ 2016-08-22 19:33 UTC (permalink / raw)
  To: pgsql-committers

Fix possible sorting error when aborting use of abbreviated keys.

Due to an error in the abbreviated key abort logic, the most recently
processed SortTuple could be incorrectly marked NULL, resulting in an
incorrect final sort order.

In the worst case, this could result in a corrupt btree index, which
would need to be rebuild using REINDEX.  However, abbrevation doesn't
abort very often, not all data types use it, and only one tuple would
end up in the wrong place, so the practical impact of this mistake may
be somewhat limited.

Report and patch by Peter Geoghegan.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/da9659f87c868ae638ea34654737f9ef0409211f

Modified Files
--------------
src/backend/utils/sort/tuplesort.c | 6 +++---
1 file changed, 3 insertions(+), 3 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] 3+ messages in thread

* pgsql: Fix possible sorting error when aborting use of abbreviated keys
@ 2016-08-22 19:33  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Robert Haas @ 2016-08-22 19:33 UTC (permalink / raw)
  To: pgsql-committers

Fix possible sorting error when aborting use of abbreviated keys.

Due to an error in the abbreviated key abort logic, the most recently
processed SortTuple could be incorrectly marked NULL, resulting in an
incorrect final sort order.

In the worst case, this could result in a corrupt btree index, which
would need to be rebuild using REINDEX.  However, abbrevation doesn't
abort very often, not all data types use it, and only one tuple would
end up in the wrong place, so the practical impact of this mistake may
be somewhat limited.

Report and patch by Peter Geoghegan.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/008c4135ccf67e74239a17a85f912d1a51b6349e

Modified Files
--------------
src/backend/utils/sort/tuplesort.c | 6 +++---
1 file changed, 3 insertions(+), 3 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] 3+ messages in thread

* pgsql: Fix possible sorting error when aborting use of abbreviated keys
@ 2016-08-22 19:33  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Robert Haas @ 2016-08-22 19:33 UTC (permalink / raw)
  To: pgsql-committers

Fix possible sorting error when aborting use of abbreviated keys.

Due to an error in the abbreviated key abort logic, the most recently
processed SortTuple could be incorrectly marked NULL, resulting in an
incorrect final sort order.

In the worst case, this could result in a corrupt btree index, which
would need to be rebuild using REINDEX.  However, abbrevation doesn't
abort very often, not all data types use it, and only one tuple would
end up in the wrong place, so the practical impact of this mistake may
be somewhat limited.

Report and patch by Peter Geoghegan.

Branch
------
REL9_6_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/48b9ca0b60ce4e92caf6b2ad68d40d09f1795fca

Modified Files
--------------
src/backend/utils/sort/tuplesort.c | 6 +++---
1 file changed, 3 insertions(+), 3 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] 3+ messages in thread


end of thread, other threads:[~2016-08-22 19:33 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-08-22 19:33 pgsql: Fix possible sorting error when aborting use of abbreviated keys Robert Haas <rhaas@postgresql.org>
2016-08-22 19:33 pgsql: Fix possible sorting error when aborting use of abbreviated keys Robert Haas <rhaas@postgresql.org>
2016-08-22 19:33 pgsql: Fix possible sorting error when aborting use of abbreviated keys Robert Haas <rhaas@postgresql.org>

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