| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | ma100(at)hotmail(dot)com |
| Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #17336: logtape sort performance and overflow |
| Date: | 2021-12-14 16:28:07 |
| Message-ID: | 262745.1639499287@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> In logtape.c,
> * Each `swap_nodes` will execute assignment statement three times, while
> we only need execute once like in tuplesort.c
Yeah, that could be improved. I see similar coding in binaryheap.c, too.
> * right_offset(unsigned i) parameter i seemed should be `unsigned long`
Ugh, that's surely wrong. I don't know that anyone could get to >4G entries
in this heap, but it's still wrong.
Thanks for the report!
> Here's a patch
FYI, patches tend not to survive being passed through email unless
you add 'em as attachments.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dmitry Dolgov | 2021-12-14 17:36:54 | Re: BUG #17326: Postgres crashed when pg_reload_conf() with ssl certificate parameters |
| Previous Message | Tom Lane | 2021-12-14 16:18:07 | Re: When Update balloons memory |