Re: BUG #14932: SELECT DISTINCT val FROM table gets stuck in an infinite loop
Todd A. Cook <tcook@blackducksoftware.com>
From: "Todd A. Cook" <tcook@blackducksoftware.com>
To: Andres Freund <andres@anarazel.de>, Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Thomas Munro <thomas.munro@enterprisedb.com>, PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Date: 2017-12-06T21:38:18Z
Lists: pgsql-bugs
On 12/06/17 16:12, Andres Freund wrote: > >> The datasets I shared are somewhat extreme in the sense that there are >> many contiguous sequences of hash values, but it only takes one such >> sequence with at least SH_GROW_MAX_MOVE values to trigger the issue. So >> the hash table may still be perfectly fine for most keys, and only >> slightly slower for the keys in the sequence. > > Meh, we're talking about adversarial attacks here. Hmmmmm... I found this problem when I dropped 10.1 into a test environment to see what would happen. There was no deliberate attempt to break anything. -- todd
Commits
-
Improve bit perturbation in TupleHashTableHash.
- d18d4bca81f8 10.2 landed
- c068f87723ca 11.0 landed
-
Prevent growth of simplehash tables when they're "too empty".
- d1aac2998789 10.2 landed
- ab9f2c429d8f 11.0 landed
-
Add stack-overflow guards in set-operation planning.
- 1b2a3860d3ea 10.2 cited