Re: BUG #14932: SELECT DISTINCT val FROM table gets stuck in an infinite loop

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, "Todd A(dot) Cook" <tcook(at)blackducksoftware(dot)com>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14932: SELECT DISTINCT val FROM table gets stuck in an infinite loop
Date: 2018-01-29 19:11:26
Message-ID: 7425.1517253086@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

One other point here is that it's not really clear to me what a randomly
varying IV is supposed to accomplish. Surely we're not intending that
it prevents somebody from crafting a data set that causes bad hash
performance. If a user with DB access wants to cause a performance
problem, there are and always will be plenty of other avenues to making
that happen. If the idea is that for a data set that otherwise would have
bad hash performance, choosing a different IV would (almost always) fix
it, that sounds good but you're ignoring the inverse case: for a data set
that works fine, there would be some choices of IV that create a problem
where there was none before. I see no reason to think that the
probability of the former kind of situation is higher than the latter.

So I'm on board with using the extended hash functions when available,
but I'm not convinced that a varying IV buys us anything but trouble.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2018-01-29 19:26:47 Re: BUG #14932: SELECT DISTINCT val FROM table gets stuck in an infinite loop
Previous Message Todd A. Cook 2018-01-29 18:56:37 Re: BUG #14932: SELECT DISTINCT val FROM table gets stuck in an infinite loop