Re: ERROR: negative bitmapset member not allowed in SELECT
От | Manuel Rigger |
---|---|
Тема | Re: ERROR: negative bitmapset member not allowed in SELECT |
Дата | |
Msg-id | CA+u7OA6RsonbT1S06TaO99QDL2H8zS-N2jO=wSuqAOJLX5yQSg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: ERROR: negative bitmapset member not allowed in SELECT (Manuel Rigger <rigger.manuel@gmail.com>) |
Список | pgsql-bugs |
Hi everyone, I noticed that this bug was fixed in five recent commits by Tomas. Thanks a lot, Tomas! This really helps me continue testing Postgres. The five commits (e.g. [1]) reference a bug report by Andreas who reported a crash in an email with a timestamp 2019-07-10 20:37:51 [2]. However, it seems that I first reported what seems to be the same underlying bug, namely in the first email of this thread with a timestamp 2019-07-10 15:39:22 [3], where the bug results in the error "negative bitmapset member not allowed". Could it be that (some of) the five commits should actually have been attributed to me? I hope this does not appear too pedantic, but I'm developing a new DBMS testing tool, and it would be important for me to know which bug findings and associated commits can be attributed to it. By the way, I also reported two crashing bugs, which seem to expose the same underlying bug [4], but after Andreas. Best, Manuel [1] https://github.com/postgres/postgres/commit/e8b6ae2130e3a95bb776708a9a7c9cb21fe8ac87 [2] https://www.postgresql.org/message-id/8736jdhbhc.fsf%40ansel.ydns.eu [3] https://www.postgresql.org/message-id/CA+u7OA65+jEFb_TyV5g+Kq+onyJ2skMOPzgTgFH+qgLwszRqvw@mail.gmail.com [4] https://www.postgresql.org/message-id/CA+u7OA40Fe9=A3wQ2PHWy8VZg8=GpD6dxQXeXVDx6HAhRSPeRA@mail.gmail.com On Thu, Jul 11, 2019 at 1:56 PM Manuel Rigger <rigger.manuel@gmail.com> wrote: > > I found another, maybe simpler statement sequence to reproduce the > error "ERROR: negative bitmapset member not allowed": > > CREATE TABLE t0(c0 BOOLEAN, c1 BOOLEAN, UNIQUE(c1)); > CREATE STATISTICS s1 ON c0, c1 FROM t0; > INSERT INTO t0(c0) VALUES(TRUE); > ANALYZE t0; > SELECT * FROM t0 WHERE (t0.c0 AND t0.c1) >= TRUE; -- ERROR: negative > bitmapset member not allowed > > I assume that the error is caused by the same underlying bug, right? > > Best, > Manuel > > On Wed, Jul 10, 2019 at 10:18 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > > > Alvaro Herrera <alvherre@2ndquadrant.com> writes: > > > On 2019-Jul-10, Manuel Rigger wrote: > > >> CREATE TABLE t0(c0 serial, c1 boolean); > > >> CREATE STATISTICS s1 ON c0, c1 FROM t0; > > >> INSERT INTO t0(c1) VALUES(TRUE); > > >> ANALYZE; > > >> CREATE INDEX i0 ON t0(c0, (t0.c1 AND t0.c1)); > > >> SELECT * FROM (SELECT t0.c0 FROM t0 WHERE (((t0.c1) AND (t0.c1)) OR > > >> FALSE) IS TRUE) as result WHERE result.c0 IS NULL; -- unexpected: > > >> ERROR: negative bitmapset member not allowed > > > > > Backtrace: > > > > I'd say that mcv_get_match_bitmap has a completely misplaced level of > > faith that any OpExpr it's handed will have a plain Var on one side > > or the other. > > > > Not to mention an untenable assumption that the other side is a plain > > Const. > > > > regards, tom lane
В списке pgsql-bugs по дате отправления: