Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iX3gM-00014Z-Ch for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Nov 2019 13:36:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iX3gL-0004RY-5X for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Nov 2019 13:36:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from <9erthalion6@gmail.com>) id 1iX3gK-0004RR-Qi for pgsql-bugs@lists.postgresql.org; Tue, 19 Nov 2019 13:36:36 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <9erthalion6@gmail.com>) id 1iX3gI-0005HW-K6 for pgsql-bugs@lists.postgresql.org; Tue, 19 Nov 2019 13:36:35 +0000 Received: by mail-wr1-x441.google.com with SMTP id a15so23861768wrf.9 for ; Tue, 19 Nov 2019 05:36:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Gv3fTkoFZWzt0n+OUa/AbZWSZkJ8wzent6aCAm54uWQ=; b=Hh5uwFN+77uxvY6kUuLthkdkvyjVPQ7vgBeY98QGvRtRkkfnCSmdXsVE9ptcvROuyz zWpt3mxeEBFjy7ZixsDyndDjuBMqXvM2OTBfGJ05aStrP5uV5S9O8Mr9FjKRYrJq8cdN 5LeDZDOOok+bBWGJWlqAHKFdT0ZvbkGkDnOXXyzUgU3dZbW1mxp64ugmdSUI8VB5ENjd q0O8BLOQoCb4OFJ/E/5utPObTohfu3SOlCpH4y0dI4rm/tswAzP0IqCWgI8k3abUKqyZ 2TQrvaI+dU2+k5Cf2QFvCW4xMQWJdixF7ChNg5wJMKjcQ60h36LYznyVHq++HShBAmHr RENw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Gv3fTkoFZWzt0n+OUa/AbZWSZkJ8wzent6aCAm54uWQ=; b=UxeaTaMGBSOoBGy/88qaqLDW0/vEA6Pj8aO/SG36qex3FU278ZOAFszEFPYbCo/w35 wNJ1upo7sZUnZ87nJrOAYCge7YpwZmEwHlCSVqhvtevz7nvIyn+1kmulHQ1/cVXtDCvJ iuRxd2N3mJ8GAd7AeCDdRNF+/gdn2ao9NFU9sv+XuUVw0Jis1X5XE0CL73BkGLvYqh9z HQYIg77WmXaiIYsaeWUFEUpCoo1xhENAPZYLWMpQW1oZCMF+bSLt6kx2xC2fa3+O/hDr JlTkQGMpbq021m7WYZRcaxi0sw4BX6jo00qqcUDhnncBP3CtXEbCWNeLfzcrBxI0BsB5 iA7A== X-Gm-Message-State: APjAAAWw5IWv6P8gZtaOB3I6qdxXFAEu7Bx1gpFfLNWpUc4mL7ZEVGNT awLuCr9o0CU7nyp9MMrstG4= X-Google-Smtp-Source: APXvYqwWbWQ6YQtyE+5U6llRCUkk4EMVe1lgU77JFYYxy0t7b4xNgow18oLTdLGm0wOgGTJr653xmA== X-Received: by 2002:a5d:6a8d:: with SMTP id s13mr36205910wru.23.1574170593334; Tue, 19 Nov 2019 05:36:33 -0800 (PST) Received: from localhost ([185.85.220.193]) by smtp.gmail.com with ESMTPSA id x8sm3024412wmi.10.2019.11.19.05.36.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Nov 2019 05:36:32 -0800 (PST) Date: Tue, 19 Nov 2019 14:38:39 +0100 From: Dmitry Dolgov <9erthalion6@gmail.com> To: Manuel Rigger Cc: PostgreSQL mailing lists Subject: Re: Failed assertion clauses != NIL Message-ID: <20191119133839.5qj5zia4pkd3zldt@localhost> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Tue, Nov 19, 2019 at 01:50:51PM +0100, Manuel Rigger wrote: > > when building PostgreSQL with -enable-cassert, executing the following > statements result in an assertion error: > > CREATE TABLE t0(c0 boolean, c1 boolean, c2 boolean); > INSERT INTO t0 VALUES(FALSE, FALSE, FALSE); > CREATE STATISTICS s0 ON c0, c2 FROM t0; > ANALYZE; > SELECT * FROM t0 WHERE t0.c2 OR t0.c1 OR t0.c0; Yes, I can reproduce it too. mcv_get_match_bitmap expects that stat_clauses will not be empty, but looks like in this situation stat_clauses is indeed NIL. clauselist_selectivity_simple right before actually doesn't insist on stat_clauses being non empty, probably it's just too strict assert.