Assert failure when CREATE TEMP TABLE - Mailing list pgsql-bugs

From Richard Guo
Subject Assert failure when CREATE TEMP TABLE
Date
Msg-id CAMbWs4-x26=_QxxgdJyNbiCDzvtr2WV5ZDso_v-CukKEe6cBZw@mail.gmail.com
Whole thread Raw
Responses Re: Assert failure when CREATE TEMP TABLE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
I came across an Assert failure while running sqlancer.  The repro query
is

CREATE TEMP TABLE t0 (c0 int4range CHECK ((('')||(0.005014271491241007) NOT IN (upper(''), ((' 9O')||FALSE))) BETWEEN SYMMETRIC (initcap('dj')LIKE(((('EizW~')||t0.c0) COLLATE "en_AG.utf8"))) AND ((((0.18773675)::MONEY) IN (0.52246463::MONEY))AND(t0.c0 BETWEEN SYMMETRIC ((t0.c0+t0.c0)) AND t0.c0)))) USING heap ON COMMIT DROP;

The failure happens in init_toast_snapshot():

 /*
  * Catalog snapshots can be returned by GetOldestSnapshot() even if not
  * registered or active. That easily hides bugs around not having a
  * snapshot set up - most of the time there is a valid catalog snapshot.
  * So additionally insist that the current snapshot is registered or
  * active.
  */
 Assert(HaveRegisteredOrActiveSnapshot());

And 'git bisect' says that the first bad commit is 2489d76c, which makes
me confused because the problemed query does not seem to involve
nullingrels stuff.

Thanks
Richard

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #18158: Assert in pgstat_report_stat() fails when a backend shutting down with stats pending
Next
From: Tom Lane
Date:
Subject: Re: Assert failure when CREATE TEMP TABLE