From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Adam Scott <adam.c.scott@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16122: segfault pg_detoast_datum (datum=0x0) at fmgr.c:1833 numrange query
Date: Tue, 19 Nov 2019 11:38:13 +0100
Message-ID: <20191119103813.xnsloisoxkwrxoim@development> (raw)
In-Reply-To: <20191119014827.GC1614@paquier.xyz>
References: <16122-eb35bc248c806c15@postgresql.org>
<20191118120312.cblcswef6vuqbijq@development>
<CA+s62-Mnj-x8_ZXh7tBVU3WJ3cKUsUL2HAp2YaJSXQPw1iypFw@mail.gmail.com>
<20191119014827.GC1614@paquier.xyz>
On Tue, Nov 19, 2019 at 10:48:27AM +0900, Michael Paquier wrote:
>On Mon, Nov 18, 2019 at 03:59:14PM -0800, Adam Scott wrote:
>> It was bugging out with an empty table but it seems intermittent. A
>> successful query followed by the one above will not fail sometimes; hence
>> the need for a from-scratch startup instance of postgres.
>
>Okay, that has proved to help a lot. I have restored the dump, and
>after an analyze on natica_hdu_test I can see the failure
>immediately.
>
>I have also extracted a small test case able to reproduce the failure.
>That's actually pretty close to the scenarios I was playing with
>upthread, still I missed it:
>CREATE TABLE rangetab (a numrange);
>INSERT INTO rangetab
>SELECT ('['|| (45.0 - a::numeric/10000000) || ',' ||
> (45.1 + a::numeric/10000000) || ')')::numrange
>FROM generate_series(1,1000) as a;
>ANALYZE rangetab;
>SELECT a FROM rangetab
> WHERE a <@ '[89.9999998611111,90.0000001388889)';
>
>I can easily reproduce the failure on HEAD, REL_12_STABLE and
>REL_11_STABLE. On 10, I could not. But now that we have a test case
>that's only a matter of time.
FWIW I've managed to reproduce this on 10, but I had to build without
--enable-cassert. So this does trigger the issue:
$ ./configure --enable-debug --prefix=/home/user/pg-10
$ make -s clean
$ make -s -j8 install
$ pg_ctl -D /tmp/data init
$ pg_ctl -D /tmp/data -l pg.log start
$ createdb test
$ psql test < bug.sql
$ pgbench -n -c 1 -f q.sql test
where q.sql is simply
select id from natica_hdu_test
WHERE
"dec_range" <@ '[88.9999998611111,90.0000001388889)';
Haven't investigated further yet.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tomas.vondra@2ndquadrant.com, michael@paquier.xyz, adam.c.scott@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16122: segfault pg_detoast_datum (datum=0x0) at fmgr.c:1833 numrange query
In-Reply-To: <20191119103813.xnsloisoxkwrxoim@development>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox