Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1adhpL-0004Kv-9K for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Mar 2016 17:23:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1adhpK-0001pO-RX for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Mar 2016 17:23:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1adhnz-0000IT-OE for pgsql-hackers@postgresql.org; Wed, 09 Mar 2016 17:21:51 +0000 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1adhnv-00013W-No for pgsql-hackers@postgresql.org; Wed, 09 Mar 2016 17:21:50 +0000 Received: by mail-wm0-x232.google.com with SMTP id l68so202547311wml.0 for ; Wed, 09 Mar 2016 09:21:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version; bh=TAET75ib4ojFBM6zM1/l2u5XhuyEVxDCpJg7yEwFWQY=; b=nz6TdpsVwBX2b3qanA6iV20B5zaxX5/VFCExA6NN//Ce9qInZwSoWDZzC7zZRY87g3 lrgDxm6ffwVVB/trUwgz50NjpEYgyvAfT3ms7fLrUUaF+PnnyzZ+c9BlOT9TlThuwr/T MrgnkD6ObzTUjXjTy7hAYxmLVyebrn7gX5a3IOXrsf5uZjO7MjU0zh9kdlE7b1nTj3HS 942aWeAy8x/BZFAJU2K21iUQw/OsbcLlOcpq3sdv1L2/KumM7UYz38YK4t39hYBhzoys JYdRev+2RHD6zHNQ9QV3f+ASb3zaQNeAmwV4ZewmpWHU9PyHxIuM4m6Czq2Hp2WMoysd CzcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version; bh=TAET75ib4ojFBM6zM1/l2u5XhuyEVxDCpJg7yEwFWQY=; b=doxTmdkYzzD1ZsbOI7ec2YrQikThkBrCMGm255mhgZUVYshvFyN7Rt4sW5Zo2HYPwS AZ9cVtV2r0Ot8K4slHJk2Xnvap06wkz4P/EjinOyHj6NVL07cR7IttgiPFB7hn06Fq4g OXQ+y8HZt/Nk5pGiB70APqwlj/e9XBxd4seWpVPWe2Yim2BUQi+A+r6vYB/7KpxNT0t1 M21kHqfUuygGaZ9wvm/1NQDhXtXMNPyQCjRe4KuPLk6zTSDfnZhESLPWTWL5B7x5UFTI Ph1Zc34afVxgXiRseELGejfbxD0Xd72/p70DB/OL+BzNR0Pcg/39SEOSb+0iY+TF48WK Y0TA== X-Gm-Message-State: AD7BkJJjgpiegWfwhIbf/GFqw5bJxwcUyEVBArraZdPMTXf1kdEJQd+l8ATTOJh1i/CWxVQf X-Received: by 10.28.177.132 with SMTP id a126mr25552826wmf.86.1457544106055; Wed, 09 Mar 2016 09:21:46 -0800 (PST) Received: from development (ip-78-45-216-26.net.upcbroadband.cz. [78.45.216.26]) by smtp.gmail.com with ESMTPSA id 82sm24605440wmd.4.2016.03.09.09.21.44 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 Mar 2016 09:21:45 -0800 (PST) Message-ID: <1457544102.24545.79.camel@2ndquadrant.com> Subject: Re: multivariate statistics v14 From: Tomas Vondra To: Jeff Janes Cc: Alvaro Herrera , pgsql-hackers Date: Wed, 09 Mar 2016 18:21:42 +0100 In-Reply-To: References: <20160309122245.GA958049@alvherre.pgsql> <1457535779.24545.71.camel@2ndquadrant.com> Content-Type: multipart/mixed; boundary="=-fCiZgilGOBbGUuNGBTxq" X-Mailer: Evolution 3.12.11 (3.12.11-1.fc21) Mime-Version: 1.0 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --=-fCiZgilGOBbGUuNGBTxq Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Hi, On Wed, 2016-03-09 at 08:45 -0800, Jeff Janes wrote: > On Wed, Mar 9, 2016 at 7:02 AM, Tomas Vondra > wrote: > > Hi, > > > > thanks for the feedback. Attached is v14 of the patch series, fixing > > most of the points you've raised. > > > Hi Tomas, > > Applied to aa09cd242fa7e3a694a31f, I still get the seg faults in make > check if I configure without --enable-cassert. Ah, after disabling asserts I can reproduce it too. And the reason why it fails is quite simple - clauselist_selectivity modifies the original list of clauses, which then confuses cost_qual_eval. Can you try if the attached patch fixes the issue? I'll need to rework a bit more of the code, but let's see if this fixes the issue on your machine too. > With --enable-cassert, it passes the regression test. I wonder how can it work with casserts and fail without them. That's kinda exactly the opposite to what I'd expect ... regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --=-fCiZgilGOBbGUuNGBTxq Content-Disposition: attachment; filename="mvstats-segfault-fix.patch" Content-Transfer-Encoding: base64 Content-Type: text/x-patch; name="mvstats-segfault-fix.patch"; charset="UTF-8" ZGlmZiAtLWdpdCBhL3NyYy9iYWNrZW5kL29wdGltaXplci9wYXRoL2NsYXVz ZXNlbC5jIGIvc3JjL2JhY2tlbmQvb3B0aW1pemVyL3BhdGgvY2xhdXNlc2Vs LmMKaW5kZXggMjU0MGRhOS4uZGRmZGMzYiAxMDA2NDQKLS0tIGEvc3JjL2Jh Y2tlbmQvb3B0aW1pemVyL3BhdGgvY2xhdXNlc2VsLmMKKysrIGIvc3JjL2Jh Y2tlbmQvb3B0aW1pemVyL3BhdGgvY2xhdXNlc2VsLmMKQEAgLTI3OSw2ICsy NzksMTAgQEAgY2xhdXNlbGlzdF9zZWxlY3Rpdml0eShQbGFubmVySW5mbyAq cm9vdCwKIAkJTGlzdCAqc29sdXRpb24gPSBjaG9vc2VfbXZfc3RhdGlzdGlj cyhyb290LCByZWxpZCwgc3RhdHMsCiAJCQkJCQkJCQkJCSAgY2xhdXNlcywg Y29uZGl0aW9ucyk7CiAKKwkJLyogRklYTUUgd2UgbXVzdCBub3Qgc2NyaWJi bGUgb3ZlciB0aGUgb3JpZ2luYWwgbGlzdCAqLworCQlpZiAoc29sdXRpb24p CisJCQljbGF1c2VzID0gbGlzdF9jb3B5KGNsYXVzZXMpOworCiAJCS8qCiAJ CSAqIFdlIGhhdmUgYSBnb29kIHNvbHV0aW9uLCB3aGljaCBpcyBtZXJlbHkg YSBsaXN0IG9mIHN0YXRpc3RpY3MgdGhhdAogCQkgKiB3ZSBuZWVkIHRvIGFw cGx5LiBXZSdsbCBhcHBseSB0aGUgc3RhdGlzdGljcyBvbmUgYnkgb25lIChp biB0aGUgb3JkZXIK --=-fCiZgilGOBbGUuNGBTxq Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers --=-fCiZgilGOBbGUuNGBTxq--