From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
---|---|
To: | Zhang Mingli <zmlpostgres(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: [patch]HashJoin crash |
Date: | 2022-08-13 19:17:46 |
Message-ID: | 20220813191746.GI26198@telsasoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
+ Tom Lane
On Fri, Aug 12, 2022 at 11:05:06PM +0800, Zhang Mingli wrote:
> I got a coredump when using hash join on a Postgres derived Database(Greenplum DB).
> And I find a way to reproduce it on Postgres.
>
> Root cause:
>
> In ExecChooseHashTableSize(), commit b154ee63bb uses func pg_nextpower2_size_t
> whose param must not be 0.
>
> sbuckets = pg_nextpower2_size_t(hash_table_bytes / bucket_size);
>
> There is a potential risk that hash_table_bytes < bucket_size in some corner cases.
>
> Reproduce sql:
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2022-08-13 20:49:18 | Goodbye Windows XP |
Previous Message | Andres Freund | 2022-08-13 19:08:43 | Re: [HACKERS] [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage. |