Re: BUG #18247: Integer overflow leads to negative width
От
Tom Lane
Тема
Re: BUG #18247: Integer overflow leads to negative width
Дата
Msg-id
2993260.1702654983@sss.pgh.pa.us
Ответ на
Re: BUG #18247: Integer overflow leads to negative width (Richard Guo)
Список
Дерево обсуждения
BUG #18247: Integer overflow leads to negative width PG Bug reporting form <noreply@postgresql.org>
Re: BUG #18247: Integer overflow leads to negative width Richard Guo <guofenglinux@gmail.com>
Re: BUG #18247: Integer overflow leads to negative width Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #18247: Integer overflow leads to negative width Richard Guo <guofenglinux@gmail.com>
Re: BUG #18247: Integer overflow leads to negative width Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #18247: Integer overflow leads to negative width Richard Guo <guofenglinux@gmail.com>
Re: BUG #18247: Integer overflow leads to negative width Junwang Zhao <zhjwpku@gmail.com>
Re: BUG #18247: Integer overflow leads to negative width Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #18247: Integer overflow leads to negative width Richard Guo <guofenglinux@gmail.com>
Re: BUG #18247: Integer overflow leads to negative width Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #18247: Integer overflow leads to negative width Richard Guo <guofenglinux@gmail.com>
Re: BUG #18247: Integer overflow leads to negative width Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #18247: Integer overflow leads to negative width Richard Guo <guofenglinux@gmail.com>
Re: BUG #18247: Integer overflow leads to negative width RekGRpth <rekgrpth@gmail.com>
Re: BUG #18247: Integer overflow leads to negative width RekGRpth <rekgrpth@gmail.com>
Re: BUG #18247: Integer overflow leads to negative width Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #18247: Integer overflow leads to negative width Alexander Lakhin <exclusion@gmail.com>
Re: BUG #18247: Integer overflow leads to negative width Richard Guo <guofenglinux@gmail.com>
Re: BUG #18247: Integer overflow leads to negative width Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #18247: Integer overflow leads to negative width Richard Guo <guofenglinux@gmail.com>
Re: BUG #18247: Integer overflow leads to negative width Julien Rouhaud <rjuju123@gmail.com>
Richard Guo writes: > On Thu, Dec 14, 2023 at 10:43 PM Tom Lane wrote: >> Probably better to clamp tuple width estimates to MaxAllocSize. >> Anything larger would not correspond to reality anyhow. > Fair point. How about the attached patch? We'd need to hit at least build_joinrel_tlist too. Not sure offhand whether this is enough to cover upper-relation tlists. As far as the specifics go, is it enough to clamp once? I think we'd either have to clamp after each addition, or change the running-sum variables to double and clamp just before storing into the final width field. The latter seems probably less error-prone in the long run. Also, given that we'll need at least three copies of the clamp rule, I wonder if it's worth inventing a function comparable to clamp_row_est(). regards, tom lane
В списке pgsql-bugs по дате отправления
От: Michael Paquier
Дата: