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 1iVn19-0003aa-0t for pgsql-bugs@arkaria.postgresql.org; Sat, 16 Nov 2019 01:36:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iVn17-0003qp-PN for pgsql-bugs@arkaria.postgresql.org; Sat, 16 Nov 2019 01:36:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iVn17-0003qi-EL for pgsql-bugs@lists.postgresql.org; Sat, 16 Nov 2019 01:36:49 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iVn14-0007w9-I9 for pgsql-bugs@lists.postgresql.org; Sat, 16 Nov 2019 01:36:49 +0000 Received: by mail-wr1-x441.google.com with SMTP id i12so12882633wro.5 for ; Fri, 15 Nov 2019 17:36:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=aokcezUAXDF3SfQhiwaDdT4yzX9w8tdrWH/i37LPRNg=; b=b4g0MgDaqEeUOctmLxoZfvEDWNccxHro4yFgQQ3WdpknXJFiIikexCd5xPzoZc4U6c YZJw6TcqldkvTMD6GsmSqUt3vAcUw7LVIqX8gO77NOapHU6f9L++Iw7x9CHo0myyisxt 1rveO7WKnrhl1St9erEzRqsfHVd5hJirrjn+o6U5O6NxNRMd99XRcQjWdYy8JrcG/T5s /7+8FiRpqaG8zdg+lQdnNbDfWo/ZGWKsFw20rbYpuU6Crg5R0oxDckPYWB45mBQ+lRjb dpQ/MMNIgPzfRAA1Pyg3PP8eRtsFtdbTR2JfZx/Fm+UxkvV/K7OkbhQNr9E9H/hWaDAD mY/w== 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:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=aokcezUAXDF3SfQhiwaDdT4yzX9w8tdrWH/i37LPRNg=; b=ZcnLBweF14SDfTDCYR88Wmgc/lsrB9U+pm5SojOlmP+1onFzxFbQCPc9XO3paChood YdOyhbQculEe5ZgBBZofV/AcGImGWxeDNX1nvAb/atHyhUXDMEDcdZDkqxg9gp0z9Ort iWZ8zEDDDQ4TlrnxBK5/qmEzYKgdj9LPQhjsrR3xvPj5D3ns6p/EeMrAckOLcyP2/wxU D4mOK+OPBFxD3vjEY485z+38No1Bn4ZuKB+vUU7lLpGhKe/FpWXok6tbEl9HTrU2JaVc VIqncnIf4a5JB2kYVTcPJroh+pabkZfI42R29ACnKukCs+c/7ZiR9XYytW3m6L2/ff6d unwA== X-Gm-Message-State: APjAAAUUAHAsC9VDSz4+B1kQvUEp/zaJKSNT4/B+7DeYaDEDKg+2objk 8lWexoeV+aLjDAMpJGF/d6l70Q== X-Google-Smtp-Source: APXvYqxzLCv+m1ugIkp5pQCmu5MT74X4DSgL52m83WleKte9f0yqvWN7ItRQWoGqQ1t0nBYCn/y9Uw== X-Received: by 2002:adf:a559:: with SMTP id j25mr18696917wrb.31.1573868205209; Fri, 15 Nov 2019 17:36:45 -0800 (PST) Received: from localhost (ip-86-49-253-92.net.upcbroadband.cz. [86.49.253.92]) by smtp.gmail.com with ESMTPSA id w132sm12403428wma.6.2019.11.15.17.36.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Nov 2019 17:36:43 -0800 (PST) Date: Sat, 16 Nov 2019 02:36:42 +0100 From: Tomas Vondra To: tuomas.leikola@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16111: Unexpected query compilation error =?utf-8?B?4oCc?= =?utf-8?Q?negative_bitmapset_member_not_allowed=E2=80=9D?= Message-ID: <20191116013642.t45tcb5r2av5nhn5@development> References: <16111-687799584c3a7e73@postgresql.org> <20191113134114.rxcli5c6zjmryvf6@development> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191113134114.rxcli5c6zjmryvf6@development> User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Nov 13, 2019 at 02:41:14PM +0100, Tomas Vondra wrote: >On Wed, Nov 13, 2019 at 10:42:32AM +0000, PG Bug reporting form wrote: >>The following bug has been logged on the website: >> >>Bug reference: 16111 >>Logged by: Tuomas Leikola >>Email address: tuomas.leikola@gmail.com >>PostgreSQL version: 12.0 >>Operating system: windows, linux >>Description: >> >>I’ve been trying to cook up some kind of online reorganizer, which requires >>looking at rows’ physical locations and rearranging those that are >>suboptimal. In this endeavor, I stumbled on what appears to be a compiler >>bug introduced with multivariate statistics. >> > >Yeah, this is a bug in estimate_multivariate_ndistinct, which fails to >ignore system attributes :-( > >The attached patch fixes it, but unfortunatly we've missed this round of >minor releases :-( I'll get it pushed in a couple of days. > >Thanks for the report and the reproducer, very helpful! > I've pushed the fix, after a minor improvement (it wasn't quite right, because the bitmap was updated again a bit later). Backpatched to 10+. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services