pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
32+ messages / 5 participants
[nested] [flat]
* BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
@ 2016-06-23 16:25 danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 32+ messages in thread
From: danielnewman@umich.edu @ 2016-06-23 16:25 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 14210
Logged by: Daniel Newman
Email address: danielnewman@umich.edu
PostgreSQL version: 9.5.3
Operating system: OS X 10.11.5
Description:
I have a table with one column and a hash index:
Table "public.hash_issue_table"
Column | Type | Modifiers
-------------------+-------------------+-----------
hash_issue_column | character varying | not null
Indexes:
"hash_issue_index" hash (hash_issue_column)
When I run the query `select * from hash_issue_table where hash_issue_column
like '2184';` I get 701 results. When I run the query
When I run the query `select * from hash_issue_table where hash_issue_column
= '2184';`, I get 0 results. However, if I drop the hash index and rerun the
second query, I get the same results.
I have created a sql dump file containing the data needed to replicate the
issue, but it is too large to copy/paste here. Is there somewhere I can
upload or send that file?
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
@ 2016-06-23 17:04 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
0 siblings, 1 reply; 32+ messages in thread
From: Tom Lane @ 2016-06-23 17:04 UTC (permalink / raw)
To: danielnewman@umich.edu; +Cc: pgsql-bugs
danielnewman@umich.edu writes:
> When I run the query `select * from hash_issue_table where hash_issue_column
> like '2184';` I get 701 results. When I run the query
> When I run the query `select * from hash_issue_table where hash_issue_column
> = '2184';`, I get 0 results. However, if I drop the hash index and rerun the
> second query, I get the same results.
Sounds like a corrupted hash index to me; which is not terribly surprising
given hash indexes' lack of WAL support. Can you reproduce this after
rebuilding the hash index?
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-06-23 17:31 ` Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 32+ messages in thread
From: Daniel Newman @ 2016-06-23 17:31 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: danielnewman@umich.edu; pgsql-bugs
Yes. If i delete the index and recreate it, the bug is replicated. I have
uploaded a pg_dump .sql file to
https://www.dropbox.com/s/4dxuo2uthj721od/hash_issue_db.sql?dl=0 that you
can use to recreate the issue.
After creating the database when I run:
>>> select * from hash_issue_table where hash_issue_column = '1';
I get no results.
When I run:
>>> drop index hash_issue_index;
>>> select * from hash_issue_table where hash_issue_column = '1';
I get 531 rows of results.
When I run:
>>> create index hash_issue_index on hash_issue_table using
hash(hash_issue_column);
>>> select * from hash_issue_table where hash_issue_column = '1';
I get 0 results again. I have repeated this successfully multiple times and
on a coworker's machine as well.
Interestingly, I modified the pg_dump file a bit. At the end, it says:
CREATE INDEX hash_issue_index ON hash_issue_table USING hash
> (hash_issue_column);
>
> DROP INDEX hash_issue_index;
>
> CREATE INDEX hash_issue_index ON hash_issue_table USING hash
> (hash_issue_column);
>
This is because the issue was not replicating (for some reason) when it
built the index the first time.
On Thu, Jun 23, 2016 at 1:04 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> danielnewman@umich.edu writes:
> > When I run the query `select * from hash_issue_table where
> hash_issue_column
> > like '2184';` I get 701 results. When I run the query
> > When I run the query `select * from hash_issue_table where
> hash_issue_column
> > = '2184';`, I get 0 results. However, if I drop the hash index and rerun
> the
> > second query, I get the same results.
>
> Sounds like a corrupted hash index to me; which is not terribly surprising
> given hash indexes' lack of WAL support. Can you reproduce this after
> rebuilding the hash index?
>
> regards, tom lane
>
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
@ 2016-06-23 23:08 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 23:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 17:57 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Robert Haas <robertmhaas@gmail.com>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
0 siblings, 4 replies; 32+ messages in thread
From: Tom Lane @ 2016-06-23 23:08 UTC (permalink / raw)
To: Daniel Newman <dtnewman@gmail.com>; +Cc: danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
Daniel Newman <dtnewman@gmail.com> writes:
> Yes. If i delete the index and recreate it, the bug is replicated.
So the answer is that this got broken by commit 9f03ca915196dfc8,
which appears to have imagined that _hash_form_tuple() is just an
alias for index_form_tuple(). But it ain't. As a result, construction
of hash indexes larger than shared_buffers is broken in 9.5 and up:
what gets entered into the index is garbage, because we are taking
raw data as if it were already hashed. (In fact, in this example,
we seem to be taking *pointers* to raw data as the hash values.)
> Interestingly, I modified the pg_dump file a bit. At the end, it says:
>> CREATE INDEX hash_issue_index ON hash_issue_table USING hash
>> (hash_issue_column);
>> DROP INDEX hash_issue_index;
>> CREATE INDEX hash_issue_index ON hash_issue_table USING hash
>> (hash_issue_column);
> This is because the issue was not replicating (for some reason) when it
> built the index the first time.
I think what's happening there is that the first CREATE INDEX
underestimates the size of the table and decides it doesn't need to
use the _h_spool() code path. The other path isn't broken.
We can either revert the aforesaid commit so far as it affects hash,
or do something to break _hash_form_tuple's encapsulation of the
hash-value-for-data substitution. I don't immediately see a non-messy
way to do the latter.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-06-23 23:31 ` Daniel Newman <dtnewman@gmail.com>
3 siblings, 0 replies; 32+ messages in thread
From: Daniel Newman @ 2016-06-23 23:31 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
Wow, thank you for such a quick response! And thanks for pointing out the
commit... I'm definitely interested in having a look at the code.
In the meantime, I can solve the specific problem I'm having by switching
to a btree index :)
Thank you for this and all the rest of your great work.
Best,
Daniel Newman
On Thu, Jun 23, 2016 at 7:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Daniel Newman <dtnewman@gmail.com> writes:
> > Yes. If i delete the index and recreate it, the bug is replicated.
>
> So the answer is that this got broken by commit 9f03ca915196dfc8,
> which appears to have imagined that _hash_form_tuple() is just an
> alias for index_form_tuple(). But it ain't. As a result, construction
> of hash indexes larger than shared_buffers is broken in 9.5 and up:
> what gets entered into the index is garbage, because we are taking
> raw data as if it were already hashed. (In fact, in this example,
> we seem to be taking *pointers* to raw data as the hash values.)
>
> > Interestingly, I modified the pg_dump file a bit. At the end, it says:
> >> CREATE INDEX hash_issue_index ON hash_issue_table USING hash
> >> (hash_issue_column);
> >> DROP INDEX hash_issue_index;
> >> CREATE INDEX hash_issue_index ON hash_issue_table USING hash
> >> (hash_issue_column);
> > This is because the issue was not replicating (for some reason) when it
> > built the index the first time.
>
> I think what's happening there is that the first CREATE INDEX
> underestimates the size of the table and decides it doesn't need to
> use the _h_spool() code path. The other path isn't broken.
>
> We can either revert the aforesaid commit so far as it affects hash,
> or do something to break _hash_form_tuple's encapsulation of the
> hash-value-for-data substitution. I don't immediately see a non-messy
> way to do the latter.
>
> regards, tom lane
>
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-06-23 23:32 ` Tom Lane <tgl@sss.pgh.pa.us>
3 siblings, 0 replies; 32+ messages in thread
From: Tom Lane @ 2016-06-23 23:32 UTC (permalink / raw)
To: Robert Haas <robertmhaas@gmail.com>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu; pgsql-bugs
I wrote:
> So the answer is that this got broken by commit 9f03ca915196dfc8,
> which appears to have imagined that _hash_form_tuple() is just an
> alias for index_form_tuple(). But it ain't. As a result, construction
> of hash indexes larger than shared_buffers is broken in 9.5 and up:
BTW, an easy way to prove that the _h_spool code path is broken is to
do this:
inline patch 1: src/backend/access/hash/hash.c (+1/-1 lines) download inline-1.patch
diff --git a/src/backend/access/hash/hash.c b/src/backend/access/hash/hash.c
index 49a6c81..162cb63 100644
--- a/src/backend/access/hash/hash.c
+++ b/src/backend/access/hash/hash.c
@@ -125,7 +125,7 @@ hashbuild(Relation heap, Relation index, IndexInfo *indexInfo)
* NOTE: this test will need adjustment if a bucket is ever different from
* one page.
*/
- if (num_buckets >= (uint32) NBuffers)
+ if (1)
buildstate.spool = _h_spoolinit(heap, index, num_buckets);
else
buildstate.spool = NULL;
and then run the regression tests. I'm thinking it would be a good
idea to provide some less-painful way to force that code path to be
taken for testing purposes.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-06-24 17:57 ` Robert Haas <robertmhaas@gmail.com>
2016-06-24 20:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
3 siblings, 1 reply; 32+ messages in thread
From: Robert Haas @ 2016-06-24 17:57 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Daniel Newman <dtnewman@gmail.com>; pgsql-bugs
On Thu, Jun 23, 2016 at 7:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Daniel Newman <dtnewman@gmail.com> writes:
>> Yes. If i delete the index and recreate it, the bug is replicated.
>
> So the answer is that this got broken by commit 9f03ca915196dfc8,
> which appears to have imagined that _hash_form_tuple() is just an
> alias for index_form_tuple(). But it ain't. As a result, construction
> of hash indexes larger than shared_buffers is broken in 9.5 and up:
> what gets entered into the index is garbage, because we are taking
> raw data as if it were already hashed. (In fact, in this example,
> we seem to be taking *pointers* to raw data as the hash values.)
Oops.
>> Interestingly, I modified the pg_dump file a bit. At the end, it says:
>>> CREATE INDEX hash_issue_index ON hash_issue_table USING hash
>>> (hash_issue_column);
>>> DROP INDEX hash_issue_index;
>>> CREATE INDEX hash_issue_index ON hash_issue_table USING hash
>>> (hash_issue_column);
>> This is because the issue was not replicating (for some reason) when it
>> built the index the first time.
>
> I think what's happening there is that the first CREATE INDEX
> underestimates the size of the table and decides it doesn't need to
> use the _h_spool() code path. The other path isn't broken.
>
> We can either revert the aforesaid commit so far as it affects hash,
> or do something to break _hash_form_tuple's encapsulation of the
> hash-value-for-data substitution. I don't immediately see a non-messy
> way to do the latter.
Would it work to have something like _hash_form_tuple() except that
instead of returning an index tuple it would just return the Datum and
isnull flags and let the caller decide what to do with them?
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 17:57 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Robert Haas <robertmhaas@gmail.com>
@ 2016-06-24 20:04 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 32+ messages in thread
From: Tom Lane @ 2016-06-24 20:04 UTC (permalink / raw)
To: Robert Haas <robertmhaas@gmail.com>; +Cc: Daniel Newman <dtnewman@gmail.com>; pgsql-bugs
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Jun 23, 2016 at 7:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> We can either revert the aforesaid commit so far as it affects hash,
>> or do something to break _hash_form_tuple's encapsulation of the
>> hash-value-for-data substitution. I don't immediately see a non-messy
>> way to do the latter.
> Would it work to have something like _hash_form_tuple() except that
> instead of returning an index tuple it would just return the Datum and
> isnull flags and let the caller decide what to do with them?
Yeah. Let's define it as a function that transforms input values/isnull
arrays into output values/isnull arrays. It seems all right for the
callers to know the latter are always of length 1, so they can be local
variables in the callers. I'll go make it so.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-06-24 21:04 ` Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
3 siblings, 1 reply; 32+ messages in thread
From: Peter Geoghegan @ 2016-06-24 21:04 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
On Thu, Jun 23, 2016 at 4:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> So the answer is that this got broken by commit 9f03ca915196dfc8,
> which appears to have imagined that _hash_form_tuple() is just an
> alias for index_form_tuple(). But it ain't.
Can we add test coverage that will detect when comparetup_index_hash()
gives wrong answers, please? It's been broken at least 2 times, that
I'm aware of. I'll write a patch, if that helps.
--
Peter Geoghegan
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
@ 2016-06-24 21:20 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
0 siblings, 1 reply; 32+ messages in thread
From: Tom Lane @ 2016-06-24 21:20 UTC (permalink / raw)
To: Peter Geoghegan <pg@heroku.com>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
Peter Geoghegan <pg@heroku.com> writes:
> On Thu, Jun 23, 2016 at 4:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> So the answer is that this got broken by commit 9f03ca915196dfc8,
>> which appears to have imagined that _hash_form_tuple() is just an
>> alias for index_form_tuple(). But it ain't.
> Can we add test coverage that will detect when comparetup_index_hash()
> gives wrong answers, please? It's been broken at least 2 times, that
> I'm aware of. I'll write a patch, if that helps.
I agree that we need to do something, but I'm not very clear on what
the something is. I considered inventing a debug #define that would
reduce the _h_spool threshold to the minimum workable amount (2, looks
like), but I'm not sure how much that will help. What did you have
in mind?
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-06-24 21:56 ` Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 32+ messages in thread
From: Peter Geoghegan @ 2016-06-24 21:56 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
On Fri, Jun 24, 2016 at 2:20 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I agree that we need to do something, but I'm not very clear on what
> the something is. I considered inventing a debug #define that would
> reduce the _h_spool threshold to the minimum workable amount (2, looks
> like), but I'm not sure how much that will help. What did you have
> in mind?
I think we should do that. Why do you say that you're not sure how
much it will help?
It may have escaped your attention, so I'll point out that amcheck
regression tests are my solution to testing external sorting, an area
which is similarly sorely lacking.
--
Peter Geoghegan
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
@ 2016-06-24 22:05 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
0 siblings, 1 reply; 32+ messages in thread
From: Tom Lane @ 2016-06-24 22:05 UTC (permalink / raw)
To: Peter Geoghegan <pg@heroku.com>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
Peter Geoghegan <pg@heroku.com> writes:
> On Fri, Jun 24, 2016 at 2:20 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I agree that we need to do something, but I'm not very clear on what
>> the something is. I considered inventing a debug #define that would
>> reduce the _h_spool threshold to the minimum workable amount (2, looks
>> like), but I'm not sure how much that will help. What did you have
>> in mind?
> I think we should do that. Why do you say that you're not sure how
> much it will help?
Well, it won't run automatically --- unless someone spins up a buildfarm
machine that adds that symbol to CPPFLAGS, and even then we'd only have
coverage on one platform.
However, the next step up would be to invent an index storage parameter or
some such to force the decision, letting the standard regression tests
include a reasonably-cheap case that would exercise _h_spool. But that
seems like rather a large amount of work compared to the likely benefits.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-06-24 22:07 ` Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 32+ messages in thread
From: Peter Geoghegan @ 2016-06-24 22:07 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
On Fri, Jun 24, 2016 at 3:05 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I think we should do that. Why do you say that you're not sure how
>> much it will help?
>
> Well, it won't run automatically --- unless someone spins up a buildfarm
> machine that adds that symbol to CPPFLAGS, and even then we'd only have
> coverage on one platform.
I think that this is an argument against further proliferation of
#define's for this kind of thing, not an argument against adding a way
to force tuplesort based hash index builds.
--
Peter Geoghegan
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
@ 2016-06-25 15:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
0 siblings, 1 reply; 32+ messages in thread
From: Tom Lane @ 2016-06-25 15:32 UTC (permalink / raw)
To: Peter Geoghegan <pg@heroku.com>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
Peter Geoghegan <pg@heroku.com> writes:
> On Fri, Jun 24, 2016 at 3:05 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Well, it won't run automatically --- unless someone spins up a buildfarm
>> machine that adds that symbol to CPPFLAGS, and even then we'd only have
>> coverage on one platform.
> I think that this is an argument against further proliferation of
> #define's for this kind of thing, not an argument against adding a way
> to force tuplesort based hash index builds.
So ... what's your point? This statement doesn't seem to lead to a
conclusion in favor of either of the alternatives I mentioned.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-06-25 18:52 ` Peter Geoghegan <pg@heroku.com>
2016-06-25 19:01 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 32+ messages in thread
From: Peter Geoghegan @ 2016-06-25 18:52 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
On Sat, Jun 25, 2016 at 8:32 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I think that this is an argument against further proliferation of
>> #define's for this kind of thing, not an argument against adding a way
>> to force tuplesort based hash index builds.
>
> So ... what's your point? This statement doesn't seem to lead to a
> conclusion in favor of either of the alternatives I mentioned.
I'm in favor of just adding a debug option. We should introduce a more
general idea of a #define that enables a variety of debugging options,
because it's silly to have to worry about buildfarm coverage each and
every time this crops up. I'm not entirely sure what level that should
be scoped at. The status quo is impractical.
Incidentally, did you see to it that there is buildfarm coverage for
RAW_EXPRESSION_COVERAGE_TEST?
--
Peter Geoghegan
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
@ 2016-06-25 19:01 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 19:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
0 siblings, 1 reply; 32+ messages in thread
From: Tom Lane @ 2016-06-25 19:01 UTC (permalink / raw)
To: Peter Geoghegan <pg@heroku.com>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
Peter Geoghegan <pg@heroku.com> writes:
> On Sat, Jun 25, 2016 at 8:32 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> So ... what's your point? This statement doesn't seem to lead to a
>> conclusion in favor of either of the alternatives I mentioned.
> I'm in favor of just adding a debug option. We should introduce a more
> general idea of a #define that enables a variety of debugging options,
> because it's silly to have to worry about buildfarm coverage each and
> every time this crops up. I'm not entirely sure what level that should
> be scoped at. The status quo is impractical.
I don't exactly see how that leads to any improvement --- you still end
up having to manually configure some buildfarm critters for coverage, no?
> Incidentally, did you see to it that there is buildfarm coverage for
> RAW_EXPRESSION_COVERAGE_TEST?
Yes, see dromedary.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 19:01 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-06-25 19:05 ` Peter Geoghegan <pg@heroku.com>
2016-06-27 14:54 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 32+ messages in thread
From: Peter Geoghegan @ 2016-06-25 19:05 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
On Sat, Jun 25, 2016 at 12:01 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I'm in favor of just adding a debug option. We should introduce a more
>> general idea of a #define that enables a variety of debugging options,
>> because it's silly to have to worry about buildfarm coverage each and
>> every time this crops up. I'm not entirely sure what level that should
>> be scoped at. The status quo is impractical.
>
> I don't exactly see how that leads to any improvement --- you still end
> up having to manually configure some buildfarm critters for coverage, no?
Yes, but you only have to do it once. I don't see the problem with
creating a #define that represents a grab-bag of debug options that
should run on one or two buildfarm animals. That doesn't preclude also
allowing things like RAW_EXPRESSION_COVERAGE_TEST to be enabled more
selectively.
In short, I want to make it easier to add custom debugging options
that could trip a regression test failure.
--
Peter Geoghegan
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 19:01 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 19:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
@ 2016-06-27 14:54 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 15:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 18:06 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
0 siblings, 2 replies; 32+ messages in thread
From: Tom Lane @ 2016-06-27 14:54 UTC (permalink / raw)
To: Peter Geoghegan <pg@heroku.com>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
Peter Geoghegan <pg@heroku.com> writes:
> On Sat, Jun 25, 2016 at 12:01 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I don't exactly see how that leads to any improvement --- you still end
>> up having to manually configure some buildfarm critters for coverage, no?
> Yes, but you only have to do it once. I don't see the problem with
> creating a #define that represents a grab-bag of debug options that
> should run on one or two buildfarm animals. That doesn't preclude also
> allowing things like RAW_EXPRESSION_COVERAGE_TEST to be enabled more
> selectively.
Meh. I do not really think that dromedary's test options
(-DCOPY_PARSE_PLAN_TREES -DRAW_EXPRESSION_COVERAGE_TEST) represent a model
to follow for this problem. In both of those cases, the value of having
the option turned on is that it will exercise code that hasn't even been
written yet. So those options have to be enabled across the entire test
suite in order to be of much use. Furthermore, there's no particular
reason to think that they'd expose platform-dependent behavior, so there's
no real downside to having just one or two buildfarm critters using them.
But exercising a non-default code path in hash index build is something we
only need in one place in the tests, and at least in my judgment there is
a possibility for platform-specific behavior. So I think some way of
turning it on dynamically, and then adding that as a standard test case,
would be a considerable improvement. I just don't quite want to go to the
effort of inventing a GUC or reloption. Is there some intermediate
answer?
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 19:01 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 19:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 14:54 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-06-27 15:21 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 18:18 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
1 sibling, 1 reply; 32+ messages in thread
From: Tom Lane @ 2016-06-27 15:21 UTC (permalink / raw)
To: Peter Geoghegan <pg@heroku.com>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
I wrote:
> But exercising a non-default code path in hash index build is something we
> only need in one place in the tests, and at least in my judgment there is
> a possibility for platform-specific behavior. So I think some way of
> turning it on dynamically, and then adding that as a standard test case,
> would be a considerable improvement. I just don't quite want to go to the
> effort of inventing a GUC or reloption. Is there some intermediate
> answer?
A small-footprint answer that just occurred to me is to redefine the
threshold as being, not NBuffers, but maintenance_work_mem. Then a
reasonably-sized test case could be made by reducing that to its minimum
allowed value. This seems like it'd be fairly unsurprising for users
since there's lots of precedent for maintenance_work_mem affecting the
behavior of CREATE INDEX.
If maintenance_work_mem exceeds shared_buffers then you'd get a certain
amount of thrashing between shared buffers and kernel disk cache, but it
wouldn't be really awful unless maintenance_work_mem exceeded available
RAM, which would be a certifiably Bad Idea anyway. I guess we could
forestall the buffer-thrashing scenario and preserve testability by
setting the sort threshold to min(NBuffers, maintenance_work_mem).
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 19:01 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 19:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 14:54 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 15:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-06-27 18:18 ` Peter Geoghegan <pg@heroku.com>
2016-06-27 19:34 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 20:22 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 32+ messages in thread
From: Peter Geoghegan @ 2016-06-27 18:18 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
On Mon, Jun 27, 2016 at 8:21 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> A small-footprint answer that just occurred to me is to redefine the
> threshold as being, not NBuffers, but maintenance_work_mem. Then a
> reasonably-sized test case could be made by reducing that to its minimum
> allowed value. This seems like it'd be fairly unsurprising for users
> since there's lots of precedent for maintenance_work_mem affecting the
> behavior of CREATE INDEX.
I like this idea. Should I write a patch?
--
Peter Geoghegan
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 19:01 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 19:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 14:54 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 15:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 18:18 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
@ 2016-06-27 19:34 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 32+ messages in thread
From: Tom Lane @ 2016-06-27 19:34 UTC (permalink / raw)
To: Peter Geoghegan <pg@heroku.com>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
Peter Geoghegan <pg@heroku.com> writes:
> On Mon, Jun 27, 2016 at 8:21 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> A small-footprint answer that just occurred to me is to redefine the
>> threshold as being, not NBuffers, but maintenance_work_mem. Then a
>> reasonably-sized test case could be made by reducing that to its minimum
>> allowed value. This seems like it'd be fairly unsurprising for users
>> since there's lots of precedent for maintenance_work_mem affecting the
>> behavior of CREATE INDEX.
> I like this idea. Should I write a patch?
Please.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 19:01 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 19:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 14:54 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 15:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 18:18 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
@ 2016-06-27 20:22 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 20:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-07-16 02:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
1 sibling, 2 replies; 32+ messages in thread
From: Tom Lane @ 2016-06-27 20:22 UTC (permalink / raw)
To: Peter Geoghegan <pg@heroku.com>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
Peter Geoghegan <pg@heroku.com> writes:
> I like this idea. Should I write a patch?
BTW, while you're at it: it strikes me that the threshold should be
either min(NBuffers, maintenance_work_mem) or
min(NLocBuffer, maintenance_work_mem), depending on whether we're
talking about a regular or temp table/index. That is, there's a
pre-existing bug here that when NLocBuffer is a good deal less than
NBuffers (which is the typical case nowadays) you'll get a lot of
thrashing between local buffers and kernel cache, if the index isn't
quite big enough to trigger the sorting code. This might not manifest
as actual I/O, but it's not the intended behavior either.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 19:01 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 19:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 14:54 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 15:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 18:18 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 20:22 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-06-27 20:31 ` Peter Geoghegan <pg@heroku.com>
2016-07-11 18:27 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
1 sibling, 1 reply; 32+ messages in thread
From: Peter Geoghegan @ 2016-06-27 20:31 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
On Mon, Jun 27, 2016 at 1:22 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Peter Geoghegan <pg@heroku.com> writes:
>> I like this idea. Should I write a patch?
>
> BTW, while you're at it: it strikes me that the threshold should be
> either min(NBuffers, maintenance_work_mem) or
> min(NLocBuffer, maintenance_work_mem), depending on whether we're
> talking about a regular or temp table/index. That is, there's a
> pre-existing bug here that when NLocBuffer is a good deal less than
> NBuffers (which is the typical case nowadays) you'll get a lot of
> thrashing between local buffers and kernel cache, if the index isn't
> quite big enough to trigger the sorting code. This might not manifest
> as actual I/O, but it's not the intended behavior either.
Understood. It's on my TODO list for the week, although I'll
prioritize isolating and fixing that UPSERT "attempted to delete
invisible tuple" bug.
--
Peter Geoghegan
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 19:01 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 19:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 14:54 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 15:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 18:18 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 20:22 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 20:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
@ 2016-07-11 18:27 ` Peter Geoghegan <pg@heroku.com>
0 siblings, 0 replies; 32+ messages in thread
From: Peter Geoghegan @ 2016-07-11 18:27 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
On Mon, Jun 27, 2016 at 1:31 PM, Peter Geoghegan <pg@heroku.com> wrote:
> Understood. It's on my TODO list for the week, although I'll
> prioritize isolating and fixing that UPSERT "attempted to delete
> invisible tuple" bug.
I would like to start work on this immediately, but feel it's
premature until my other tuplesort testing patch gets some review [1].
[1] https://www.postgresql.org/message-id/CAM3SWZSgxehDkDMq1FdiW2A0Dxc79wH0hz1x-TnGy=1BXEL+nw@mail.gmail...
--
Peter Geoghegan
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 19:01 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 19:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 14:54 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 15:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 18:18 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 20:22 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-07-16 02:21 ` Peter Geoghegan <pg@heroku.com>
2016-07-16 19:35 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 32+ messages in thread
From: Peter Geoghegan @ 2016-07-16 02:21 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
On Mon, Jun 27, 2016 at 1:22 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Peter Geoghegan <pg@heroku.com> writes:
>> I like this idea. Should I write a patch?
>
> BTW, while you're at it: it strikes me that the threshold should be
> either min(NBuffers, maintenance_work_mem) or
> min(NLocBuffer, maintenance_work_mem), depending on whether we're
> talking about a regular or temp table/index. That is, there's a
> pre-existing bug here that when NLocBuffer is a good deal less than
> NBuffers (which is the typical case nowadays) you'll get a lot of
> thrashing between local buffers and kernel cache, if the index isn't
> quite big enough to trigger the sorting code. This might not manifest
> as actual I/O, but it's not the intended behavior either.
Finally found time for this. Attached patch tests hash tuplesorts
along the lines we discussed. It adds one new tuplesort operation,
which does not spill to disk. It also asserts that hash values
retrieved through the tuplesort interface are in fact in sorted order.
I wanted to have something reliably trip when comparetup_index_hash()
gives wrong answers, even when a corrupt final index is perhaps not a
consequence of the underlying bug.
Due to how the hash build code works, maintenance_work_mem will need
to be 2 blocks smaller than the final index size in order to force a
sort (see code comments). I think that this does not matter, since
none of this is documented currently.
Having reviewed the coverage report for tuplesort.c [1], I think that
the only notable testing omission once this latest patch is committed
will be that there is no coverage for "backwards get tuple" cases
(this is more noticeable when looking at coverage statistics for
logtape.c, actually). This seems less important to me, and would be
awkward to test in any case, given my constraints.
[1] http://coverage.postgresql.org/src/backend/utils/sort/tuplesort.c.gcov.html
--
Peter Geoghegan
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Attachments:
0001-Add-regression-test-cases-for-hash-tuplesorts.patch (text/x-patch, 8.9K) download
From 7161a81d2792e0e91340398684fe211c415912d8 Mon Sep 17 00:00:00 2001
From: Peter Geoghegan <pg@bowt.ie>
Date: Fri, 15 Jul 2016 13:21:57 -0700
Subject: [PATCH] Add regression test cases for hash tuplesorts.
This includes a subtle behavioral change: We now treat
maintenance_work_mem, or the number of usable buffers (whichever is
less) as the cut-off point at which hash index builds use tuplesort
rather than inserting tuples into the index directly, in scan order.
Previously, only shared_buffers was used (and never temp_buffers in the
case of temporary relations).
In addition to adding a test of the basic sanity of a hash index built
with a spool/tuplesort, assert that hash values are found in order as
they are retrieved from tuplesort.
These tests would have caught bugs fixed by commit 8cf739de, commit
2720e96a, and possibly others.
---
src/backend/access/hash/hash.c | 22 +++++++++++++---
src/backend/access/hash/hashsort.c | 22 +++++++++++++---
src/test/regress/expected/create_index.out | 6 +++++
src/test/regress/expected/hash_index.out | 40 ++++++++++++++++++++++++++++++
src/test/regress/sql/create_index.sql | 5 ++++
src/test/regress/sql/hash_index.sql | 27 ++++++++++++++++++++
6 files changed, 116 insertions(+), 6 deletions(-)
diff --git a/src/backend/access/hash/hash.c b/src/backend/access/hash/hash.c
index 19695ee..e68dc7c 100644
--- a/src/backend/access/hash/hash.c
+++ b/src/backend/access/hash/hash.c
@@ -22,6 +22,7 @@
#include "access/relscan.h"
#include "catalog/index.h"
#include "commands/vacuum.h"
+#include "miscadmin.h"
#include "optimizer/plancat.h"
#include "utils/index_selfuncs.h"
#include "utils/rel.h"
@@ -97,6 +98,7 @@ hashbuild(Relation heap, Relation index, IndexInfo *indexInfo)
double reltuples;
double allvisfrac;
uint32 num_buckets;
+ uint32 num_buckets_sort_threshold;
HashBuildState buildstate;
/*
@@ -120,12 +122,26 @@ hashbuild(Relation heap, Relation index, IndexInfo *indexInfo)
* then we'll thrash horribly. To prevent that scenario, we can sort the
* tuples by (expected) bucket number. However, such a sort is useless
* overhead when the index does fit in RAM. We choose to sort if the
- * initial index size exceeds NBuffers.
+ * initial index size exceeds maintenance_work_mem, or the number of
+ * buffers usable by the relation, whichever is less. (It may be useful
+ * to sort in cases where NLocBuffer is quite low and thrashing between
+ * local buffers and kernel cache can be minimized by sorting. Seems
+ * unlikely that NBuffers would ever be less than maintenance_work_mem,
+ * though, but be consistent.)
*
* NOTE: this test will need adjustment if a bucket is ever different from
- * one page.
+ * one page. Also, "initial index size" accounting does not include the
+ * metapage, nor the first bitmap page.
*/
- if (num_buckets >= (uint32) NBuffers)
+ if (heap->rd_rel->relpersistence != RELPERSISTENCE_TEMP)
+ num_buckets_sort_threshold = NBuffers;
+ else
+ num_buckets_sort_threshold = NLocBuffer;
+
+ num_buckets_sort_threshold =
+ Min((uint32) maintenance_work_mem / (BLCKSZ / 1024),
+ num_buckets_sort_threshold);
+ if (num_buckets >= num_buckets_sort_threshold)
buildstate.spool = _h_spoolinit(heap, index, num_buckets);
else
buildstate.spool = NULL;
diff --git a/src/backend/access/hash/hashsort.c b/src/backend/access/hash/hashsort.c
index 51b9f3f..c1d70c1 100644
--- a/src/backend/access/hash/hashsort.c
+++ b/src/backend/access/hash/hashsort.c
@@ -37,6 +37,7 @@ struct HSpool
{
Tuplesortstate *sortstate; /* state data for tuplesort.c */
Relation index;
+ uint32 hash_mask; /* bitmask for hash codes */
};
@@ -47,7 +48,6 @@ HSpool *
_h_spoolinit(Relation heap, Relation index, uint32 num_buckets)
{
HSpool *hspool = (HSpool *) palloc0(sizeof(HSpool));
- uint32 hash_mask;
hspool->index = index;
@@ -60,7 +60,7 @@ _h_spoolinit(Relation heap, Relation index, uint32 num_buckets)
* we could just compute num_buckets - 1. We prefer not to assume that
* here, though.
*/
- hash_mask = (((uint32) 1) << _hash_log2(num_buckets)) - 1;
+ hspool->hash_mask = (((uint32) 1) << _hash_log2(num_buckets)) - 1;
/*
* We size the sort area as maintenance_work_mem rather than work_mem to
@@ -69,7 +69,7 @@ _h_spoolinit(Relation heap, Relation index, uint32 num_buckets)
*/
hspool->sortstate = tuplesort_begin_index_hash(heap,
index,
- hash_mask,
+ hspool->hash_mask,
maintenance_work_mem,
false);
@@ -105,12 +105,28 @@ _h_indexbuild(HSpool *hspool)
{
IndexTuple itup;
bool should_free;
+#ifdef USE_ASSERT_CHECKING
+ uint32 lasthashkey;
+ uint32 hashkey = 0;
+#endif
tuplesort_performsort(hspool->sortstate);
while ((itup = tuplesort_getindextuple(hspool->sortstate,
true, &should_free)) != NULL)
{
+ /*
+ * Technically, it isn't critical that hash keys be found in sorted
+ * order, since sorting is only ever used to increase locality of
+ * access as a performance optimization. It still seems like a good
+ * idea to test tuplesort.c's handling of hash index tuple sorts
+ * through an assertion, though.
+ */
+#ifdef USE_ASSERT_CHECKING
+ lasthashkey = hashkey;
+ hashkey = _hash_get_indextuple_hashkey(itup) & hspool->hash_mask;
+ Assert(hashkey >= lasthashkey);
+#endif
_hash_doinsert(hspool->index, itup);
if (should_free)
pfree(itup);
diff --git a/src/test/regress/expected/create_index.out b/src/test/regress/expected/create_index.out
index 97cc49e..a138c34 100644
--- a/src/test/regress/expected/create_index.out
+++ b/src/test/regress/expected/create_index.out
@@ -2346,6 +2346,12 @@ CREATE UNLOGGED TABLE unlogged_hash_table (id int4);
CREATE INDEX unlogged_hash_index ON unlogged_hash_table USING hash (id int4_ops);
DROP TABLE unlogged_hash_table;
-- CREATE INDEX hash_ovfl_index ON hash_ovfl_heap USING hash (x int4_ops);
+-- Test hash index build tuplesorting. Force hash tuplesort using low
+-- maintenance_work_mem setting and fillfactor:
+SET maintenance_work_mem = '1MB';
+CREATE INDEX hash_tuplesort_idx ON tenk1 USING hash (stringu1 name_ops) WITH (fillfactor = 10);
+WARNING: hash indexes are not WAL-logged and their use is discouraged
+RESET maintenance_work_mem;
--
-- Test functional index
--
diff --git a/src/test/regress/expected/hash_index.out b/src/test/regress/expected/hash_index.out
index 22835f8..fb8cc5b 100644
--- a/src/test/regress/expected/hash_index.out
+++ b/src/test/regress/expected/hash_index.out
@@ -187,6 +187,46 @@ SELECT h.seqno AS f20000
20000
(1 row)
+--
+-- Test index previously created with hash tuplesort
+--
+SET enable_seqscan = off;
+SET enable_bitmapscan = off;
+SELECT SUM(hundred), SUM(thousand)
+ FROM tenk1 h
+ WHERE h.stringu1 = 'ANAAAA';
+ sum | sum
+-----+------
+ 750 | 6050
+(1 row)
+
+SELECT SUM(hundred), SUM(thousand)
+ FROM tenk1 h
+ WHERE h.stringu1 = 'UPAAAA';
+ sum | sum
+-----+------
+ 830 | 7130
+(1 row)
+
+SELECT SUM(hundred), SUM(thousand)
+ FROM tenk1 h
+ WHERE h.stringu1 = 'OQAAAA';
+ sum | sum
+-----+------
+ 730 | 7430
+(1 row)
+
+SELECT SUM(hundred), SUM(thousand)
+ FROM tenk1 h
+ WHERE h.stringu1 = 'NOT PRESENT';
+ sum | sum
+-----+-----
+ |
+(1 row)
+
+DROP INDEX hash_tuplesort_idx;
+RESET enable_seqscan;
+RESET enable_bitmapscan;
-- UPDATE hash_ovfl_heap
-- SET x = 1000
-- WHERE x = 90;
diff --git a/src/test/regress/sql/create_index.sql b/src/test/regress/sql/create_index.sql
index 7c582ea..31946e9 100644
--- a/src/test/regress/sql/create_index.sql
+++ b/src/test/regress/sql/create_index.sql
@@ -690,6 +690,11 @@ DROP TABLE unlogged_hash_table;
-- CREATE INDEX hash_ovfl_index ON hash_ovfl_heap USING hash (x int4_ops);
+-- Test hash index build tuplesorting. Force hash tuplesort using low
+-- maintenance_work_mem setting and fillfactor:
+SET maintenance_work_mem = '1MB';
+CREATE INDEX hash_tuplesort_idx ON tenk1 USING hash (stringu1 name_ops) WITH (fillfactor = 10);
+RESET maintenance_work_mem;
--
-- Test functional index
diff --git a/src/test/regress/sql/hash_index.sql b/src/test/regress/sql/hash_index.sql
index 411e8ae..062f354 100644
--- a/src/test/regress/sql/hash_index.sql
+++ b/src/test/regress/sql/hash_index.sql
@@ -139,6 +139,33 @@ SELECT h.seqno AS f20000
FROM hash_f8_heap h
WHERE h.random = '488912369'::float8;
+--
+-- Test index previously created with hash tuplesort
+--
+
+SET enable_seqscan = off;
+SET enable_bitmapscan = off;
+
+SELECT SUM(hundred), SUM(thousand)
+ FROM tenk1 h
+ WHERE h.stringu1 = 'ANAAAA';
+
+SELECT SUM(hundred), SUM(thousand)
+ FROM tenk1 h
+ WHERE h.stringu1 = 'UPAAAA';
+
+SELECT SUM(hundred), SUM(thousand)
+ FROM tenk1 h
+ WHERE h.stringu1 = 'OQAAAA';
+
+SELECT SUM(hundred), SUM(thousand)
+ FROM tenk1 h
+ WHERE h.stringu1 = 'NOT PRESENT';
+
+DROP INDEX hash_tuplesort_idx;
+RESET enable_seqscan;
+RESET enable_bitmapscan;
+
-- UPDATE hash_ovfl_heap
-- SET x = 1000
-- WHERE x = 90;
--
2.7.4
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 19:01 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 19:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 14:54 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 15:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 18:18 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 20:22 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-07-16 02:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
@ 2016-07-16 19:35 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-07-16 19:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-07-16 20:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 32+ messages in thread
From: Tom Lane @ 2016-07-16 19:35 UTC (permalink / raw)
To: Peter Geoghegan <pg@heroku.com>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
Peter Geoghegan <pg@heroku.com> writes:
> Finally found time for this. Attached patch tests hash tuplesorts
> along the lines we discussed. It adds one new tuplesort operation,
> which does not spill to disk. It also asserts that hash values
> retrieved through the tuplesort interface are in fact in sorted order.
> I wanted to have something reliably trip when comparetup_index_hash()
> gives wrong answers, even when a corrupt final index is perhaps not a
> consequence of the underlying bug.
Pushed with some adjustments, mostly paranoia concerning integer overflows
in the calculation around maintenance_work_mem. I did not like the way
you'd set up the test case though: tenk1 is *very* heavily used in the
regression tests, and having an extra index on it that might capture query
plans for unrelated test cases doesn't seem like a good idea. Especially
not when you drop the index in the middle of a large group of parallel
tests, so that any capturing that did happen would be timing-sensitive.
So I just made the create_index test create and immediately drop the
index. We have other tests that are supposed to exercise searches of
hash indexes, anyway.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 19:01 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 19:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 14:54 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 15:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 18:18 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 20:22 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-07-16 02:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-07-16 19:35 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-07-16 19:52 ` Peter Geoghegan <pg@heroku.com>
1 sibling, 0 replies; 32+ messages in thread
From: Peter Geoghegan @ 2016-07-16 19:52 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
On Sat, Jul 16, 2016 at 12:35 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> So I just made the create_index test create and immediately drop the
> index. We have other tests that are supposed to exercise searches of
> hash indexes, anyway.
I suppose that the assertion made the new hash index searches redundant.
Thanks
--
Peter Geoghegan
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 19:01 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 19:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 14:54 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 15:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 18:18 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 20:22 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-07-16 02:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-07-16 19:35 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-07-16 20:04 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-07-16 20:10 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
1 sibling, 1 reply; 32+ messages in thread
From: Tom Lane @ 2016-07-16 20:04 UTC (permalink / raw)
To: Peter Geoghegan <pg@heroku.com>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
Peter Geoghegan <pg@heroku.com> writes:
> On Sat, Jul 16, 2016 at 12:35 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> So I just made the create_index test create and immediately drop the
>> index. We have other tests that are supposed to exercise searches of
>> hash indexes, anyway.
> I suppose that the assertion made the new hash index searches redundant.
[ thinks about it a bit more... ] Actually, maybe it doesn't. The thing
that made 9f03ca915196dfc8 really nasty is that it built an index that was
actually corrupt, with incorrect hash codes stored for entries. I think
your assertion would probably have caught that, but only accidentally,
because the problem had little to do with whether the sort satisfied its
charter. Maybe we should stick at least one simple test query in there
before we drop the index again.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 19:01 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 19:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 14:54 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 15:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 18:18 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 20:22 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-07-16 02:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-07-16 19:35 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-07-16 20:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-07-16 20:10 ` Peter Geoghegan <pg@heroku.com>
2016-07-16 20:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 32+ messages in thread
From: Peter Geoghegan @ 2016-07-16 20:10 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
On Sat, Jul 16, 2016 at 1:04 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I suppose that the assertion made the new hash index searches redundant.
>
> [ thinks about it a bit more... ] Actually, maybe it doesn't. The thing
> that made 9f03ca915196dfc8 really nasty is that it built an index that was
> actually corrupt, with incorrect hash codes stored for entries. I think
> your assertion would probably have caught that, but only accidentally,
> because the problem had little to do with whether the sort satisfied its
> charter. Maybe we should stick at least one simple test query in there
> before we drop the index again.
That's what I was thinking, but wasn't sure offhand which way it would
happen. Couldn't hurt much to just add one more test.
It is pretty awkward how the hash index searches are in
hash_index.sql, which must coordinate with create_index.sql, but I
didn't want to go against the grain and just put it all in one place.
Maybe I should have.
--
Peter Geoghegan
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 19:01 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 19:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 14:54 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 15:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 18:18 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 20:22 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-07-16 02:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-07-16 19:35 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-07-16 20:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-07-16 20:10 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
@ 2016-07-16 20:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-07-16 20:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
0 siblings, 1 reply; 32+ messages in thread
From: Tom Lane @ 2016-07-16 20:32 UTC (permalink / raw)
To: Peter Geoghegan <pg@heroku.com>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
Peter Geoghegan <pg@heroku.com> writes:
> On Sat, Jul 16, 2016 at 1:04 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> ... Maybe we should stick at least one simple test query in there
>> before we drop the index again.
> That's what I was thinking, but wasn't sure offhand which way it would
> happen. Couldn't hurt much to just add one more test.
Right. Done.
> It is pretty awkward how the hash index searches are in
> hash_index.sql, which must coordinate with create_index.sql, but I
> didn't want to go against the grain and just put it all in one place.
> Maybe I should have.
Well, that structure is intended to work with indexes that are built and
then left in place throughout the tests. For a short-lived index, the
best thing is to create it, test it, drop it, and really you can do that
about anywhere. But again, doing that on tenk1 is problematic because
of its popularity in all sorts of query-planning tests; if you're going
to add a short-lived index you need to do that in a test that's not meant
to run concurrently with a lot of other stuff.
Another approach we could have taken is to construct a table just for
this purpose. But I think the way it is now is fine.
In the longer term, if hash indexes ever become less of a second-class
citizen, maybe we'd actually want to include a hash index on tenk1
throughout the tests. But I don't want to go there today.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 19:01 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 19:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 14:54 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 15:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 18:18 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 20:22 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-07-16 02:21 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-07-16 19:35 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-07-16 20:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-07-16 20:10 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-07-16 20:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-07-16 20:56 ` Peter Geoghegan <pg@heroku.com>
0 siblings, 0 replies; 32+ messages in thread
From: Peter Geoghegan @ 2016-07-16 20:56 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
On Sat, Jul 16, 2016 at 1:32 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> It is pretty awkward how the hash index searches are in
>> hash_index.sql, which must coordinate with create_index.sql, but I
>> didn't want to go against the grain and just put it all in one place.
>> Maybe I should have.
>
> Well, that structure is intended to work with indexes that are built and
> then left in place throughout the tests. For a short-lived index, the
> best thing is to create it, test it, drop it, and really you can do that
> about anywhere. But again, doing that on tenk1 is problematic because
> of its popularity in all sorts of query-planning tests; if you're going
> to add a short-lived index you need to do that in a test that's not meant
> to run concurrently with a lot of other stuff.
I did think that the "fillfactor = 10" bloat would have prevented
problems with plan stability, but I accept that that might not be good
enough.
> Another approach we could have taken is to construct a table just for
> this purpose.
I actually started with that.
Anyway, test coverage of tuplesort.c seems in much better shape now.
The strategy of not always moving the tests towards the code, but
rather moving the code towards the tests (improving code testability)
seems to have been more effective than I'd anticipated.
My unpublished parallel CREATE INDEX patch forces a single worker,
single leader (deterministic division of labor) "serial parallel" sort
for every CREATE INDEX statement when force_parallel_mode is set to
'regress'. That's a nice thing to have for testing, because the
determinism allows one to line things up just right, and reliably
tickle certain classes of bug (this made a certain amount of TDD
possible). This configuration is only useful for testing, and is not
htat different to forcing an external sort, the notable difference
being that the worker process is still reliably subject to the general
limitations of parallel sort worker processes.
--
Peter Geoghegan
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
* Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-25 19:01 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 19:05 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Peter Geoghegan <pg@heroku.com>
2016-06-27 14:54 ` Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-06-27 18:06 ` Peter Geoghegan <pg@heroku.com>
1 sibling, 0 replies; 32+ messages in thread
From: Peter Geoghegan @ 2016-06-27 18:06 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Daniel Newman <dtnewman@gmail.com>; danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>; pgsql-bugs
On Mon, Jun 27, 2016 at 7:54 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Meh. I do not really think that dromedary's test options
> (-DCOPY_PARSE_PLAN_TREES -DRAW_EXPRESSION_COVERAGE_TEST) represent a model
> to follow for this problem. In both of those cases, the value of having
> the option turned on is that it will exercise code that hasn't even been
> written yet. So those options have to be enabled across the entire test
> suite in order to be of much use. Furthermore, there's no particular
> reason to think that they'd expose platform-dependent behavior, so there's
> no real downside to having just one or two buildfarm critters using them.
You think that the hash index tuplesort code should be possible to
exercise in the regression tests dynamically, without any new #define
whatsoever. Fair enough, but I still think that enabling debug #define
options should be possible at a coarser granularity, even if that ends
up covering a set of cases that are not very crisply defined. Maybe
that's a discussion for the next time something like
RAW_EXPRESSION_COVERAGE_TEST is proposed, though.
--
Peter Geoghegan
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 32+ messages in thread
end of thread, other threads:[~2016-07-16 20:56 UTC | newest]
Thread overview: 32+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-06-23 16:25 BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column danielnewman@umich.edu
2016-06-23 17:04 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 17:31 ` Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:08 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-23 23:31 ` Daniel Newman <dtnewman@gmail.com>
2016-06-23 23:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 17:57 ` Robert Haas <robertmhaas@gmail.com>
2016-06-24 20:04 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:04 ` Peter Geoghegan <pg@heroku.com>
2016-06-24 21:20 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 21:56 ` Peter Geoghegan <pg@heroku.com>
2016-06-24 22:05 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-24 22:07 ` Peter Geoghegan <pg@heroku.com>
2016-06-25 15:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 18:52 ` Peter Geoghegan <pg@heroku.com>
2016-06-25 19:01 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-25 19:05 ` Peter Geoghegan <pg@heroku.com>
2016-06-27 14:54 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 15:21 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 18:18 ` Peter Geoghegan <pg@heroku.com>
2016-06-27 19:34 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 20:22 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 20:31 ` Peter Geoghegan <pg@heroku.com>
2016-07-11 18:27 ` Peter Geoghegan <pg@heroku.com>
2016-07-16 02:21 ` Peter Geoghegan <pg@heroku.com>
2016-07-16 19:35 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-07-16 19:52 ` Peter Geoghegan <pg@heroku.com>
2016-07-16 20:04 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-07-16 20:10 ` Peter Geoghegan <pg@heroku.com>
2016-07-16 20:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-07-16 20:56 ` Peter Geoghegan <pg@heroku.com>
2016-06-27 18:06 ` Peter Geoghegan <pg@heroku.com>
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