Re: negative bitmapset member not allowed Error with partitionpruning
От | Alvaro Herrera |
---|---|
Тема | Re: negative bitmapset member not allowed Error with partitionpruning |
Дата | |
Msg-id | 20180730225446.w7j7kpkeow7ljrjm@alvherre.pgsql обсуждение исходный текст |
Ответ на | Re: negative bitmapset member not allowed Error with partition pruning (David Rowley <david.rowley@2ndquadrant.com>) |
Список | pgsql-hackers |
On 2018-Jul-27, David Rowley wrote: > On 27 July 2018 at 15:14, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Well, my thinking is that it helps nobody if call sites have to have > > explicit workarounds for a totally-arbitrary refusal to handle edge > > cases in the primitive functions. I do not think that is good software > > design. If you want to have assertions that particular call sites are > > specifying nonempty ranges, put those in the call sites where it's > > important. But as-is, this seems like, say, defining foreach() to > > blow up on an empty list. > > Okay, that's a fair point. I agree, adding Asserts at the current > call sites seems better. Given the discussion, I pushed two commits: first, bms_add_range returns the input bms if the range is empty, also adding Rajkumar's test case, which I also verified to reproduce the bug, and passes (for me) with the bms_add_range change. The second commit includes the proposed asserts, but not the change to avoid calling bms_add_range when the range is empty. Thanks! -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: