Kouhei Kaigai <kai...@ak.jp.nec.com> wrote: > we may need a couple of overhaul around HashJoin to support large > size of data, not only nbuckets around 0x80000000.
Perhaps, but this is a clear bug, introduced to the 9.5 code, with an obvious fix; so I've pushed the change from 1 to 1L on that left shift. There was clearly an attempt in surrounding code to deal with size overruns by using a long, applying a min(), and casting to int; this one statement just missed a trick. If we need to further constrain sizes to keep within allocation limits, that seems like an entirely separate patch. Thanks for finding and analyzing this and providing a patch! -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers