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 1iuNp1-0002zy-3f for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Jan 2020 21:45:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iuNoz-0005t1-Pt for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Jan 2020 21:45:57 +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 ) id 1iuNoz-0005sp-7d for pgsql-hackers@lists.postgresql.org; Wed, 22 Jan 2020 21:45:57 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iuNol-00045o-04 for pgsql-hackers@lists.postgresql.org; Wed, 22 Jan 2020 21:45:56 +0000 Received: by mail-qt1-x841.google.com with SMTP id v25so839386qto.7 for ; Wed, 22 Jan 2020 13:45:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=GKSfGZoEn6FYuwhkv2pTGKLnfKSn0+0NYjxAlp4NrVs=; b=VJYab6GBjBOAo2AyXOZRi/rt4ISjIhGowvblDHBnCKBlGan6rzsXEy9rp3osoRDMO/ wPCA51nHimzlmoKP2zTBTzjuVr51woq2NyWRa+VnaPYMhiF8dCdi0h9/Cr7n4AosAS8T 4DxO7xFFqrTrQRLx8FAihMLZFTK4FttwYHUlNEsxcYNAit5ToXuBfNak2hFAPHc/Font qQSHExvL4eTS+HhfHaN2zCr7kN1rwBOrTIWPfNckknM2FLqAe65WGM+lzH26/G5bvUTx IatrhhG6EGJPtkC/C7jDekcVCNVuLjJqPAMTfS9rC9+c6uShslUJ8iRZEFALSQxF0wFx W4Jg== 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:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=GKSfGZoEn6FYuwhkv2pTGKLnfKSn0+0NYjxAlp4NrVs=; b=pJhoMV6HXLqu8NYwXeHBJW5i4mt2sxtwPbwx2mQr5H9yC4GY3sWOLVnp6D+FV24Tqg IYGnAz3HYFQ3SPjEJdIL5dq9l4orYXCWZ5Nr5joZM1J0uQ5eDTdoQ56BDglnFmMEoGF1 p+Mftu/fOo5FNRGAwSXtMYia+lWKvJU+1PjbRrHhVYjsGXtzk2uWjWlCxueWGHdOAeya AWobwsdzMgeeXNNunUN1NN//nHag5fuqN54KBrMnL5PpbJnUDBVNLIvqF9mCjWc2KG9N u44VVDBywxyeLL+RBisApDnnFDxDLcJHb28VnhGYHKPAsFs4YoWqro2gh1gwS+2n+QpE /WYg== X-Gm-Message-State: APjAAAWNwLkDCnWguGKCCkVsDPAaoxn3vykUAuT/D7ZCy/ssB1ySoqNp fS9nLLPgYDcoAX+RwRtuR8peLA== X-Google-Smtp-Source: APXvYqyMyWsDUHTHWcKjkH9meIgiySqT6Jya+8iiPeZBcwMLZodnWCEf+qnBeYnGeE8msqHpxRX7BQ== X-Received: by 2002:ac8:24c1:: with SMTP id t1mr12939409qtt.257.1579729542005; Wed, 22 Jan 2020 13:45:42 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([201.186.80.211]) by smtp.gmail.com with ESMTPSA id u7sm21279196qtg.13.2020.01.22.13.45.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jan 2020 13:45:41 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 2224F300A46; Wed, 22 Jan 2020 18:45:36 -0300 (-03) Date: Wed, 22 Jan 2020 18:45:36 -0300 From: Alvaro Herrera To: Heikki Linnakangas Cc: pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Fix crash in BRIN inclusion op functions, due to missing datum c Message-ID: <20200122214536.GA3912@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Jan-20, Heikki Linnakangas wrote: > That case arises at least with the range_union() function, when one of > the arguments is an 'empty' range: > > CREATE TABLE brintest (n numrange); > CREATE INDEX brinidx ON brintest USING brin (n); > INSERT INTO brintest VALUES ('empty'); > INSERT INTO brintest VALUES (numrange(0, 2^1000::numeric)); > INSERT INTO brintest VALUES ('(-1, 0)'); > > SELECT brin_desummarize_range('brinidx', 0); > SELECT brin_summarize_range('brinidx', 0); I noticed that this test increases line-wise coverage of brin_inclusion.c by a few percentage points, so I added it. Again, thanks -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services