From: Tom Lane <tgl@sss.pgh.pa.us>
To: natalya@timescale.com
Cc: pgsql-bugs@lists.postgresql.org, Peter Geoghegan <pg@bowt.ie>
Subject: Re: BUG #19049: Assert failure when using skip arrays on an index key with DESC order
Date: Thu, 11 Sep 2025 11:49:45 -0400
Message-ID: <1788650.1757605785@sss.pgh.pa.us> (raw)
In-Reply-To: <19049-b7df801e71de41b2@postgresql.org>
References: <19049-b7df801e71de41b2@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> -- This query crashes with an Assert
> select distinct on(s0, s1) * from mv where t2 >= -1 and t1 < 10 order by
> s0, s1, t1 desc, t2 desc;
> Assert is:
> if (ScanDirectionIsForward(dir) && array->low_compare)
> Assert(DatumGetBool(FunctionCall2Coll(&array->low_compare->sk_func,
> array->low_compare->sk_collation, tupdatum, array->low_compare->sk_argument)));
Indeed. "git bisect" says this started at
b3f1a13f22f9e28842ee5fbd08b7ec805e27aaac is the first bad commit
commit b3f1a13f22f9e28842ee5fbd08b7ec805e27aaac
Author: Peter Geoghegan <pg@bowt.ie>
Date: Fri Apr 4 14:14:08 2025 -0400
Avoid extra index searches through preprocessing.
Peter, you want to take a look?
regards, tom lane
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: tgl@sss.pgh.pa.us, natalya@timescale.com, pg@bowt.ie
Subject: Re: BUG #19049: Assert failure when using skip arrays on an index key with DESC order
In-Reply-To: <1788650.1757605785@sss.pgh.pa.us>
* 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