public inbox for [email protected]  
help / color / mirror / Atom feed
From: Masahiko Sawada <[email protected]>
To: Andrei Lepikhov <[email protected]>
Cc: PostgreSQL mailing lists <[email protected]>
Subject: Re: TRAP: failed Assert("offsets[i] > offsets[i - 1]"), File: "tidstore.c"
Date: Wed, 15 Apr 2026 13:50:01 -0700
Message-ID: <CAD21AoBVEcC5stzLr80RgaWuBh0EoyRQys_aeOz0ceogMVREcQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

On Wed, Apr 15, 2026 at 5:48 AM Andrei Lepikhov <[email protected]> wrote:
>
> Hi,
>
> While experimenting with query plans, I periodically see test_tidstore
> fail on the assertion in TidStoreSetBlockOffsets().
>
> The cause is that the harness function do_set_block_offsets() forwards
> the SQL array straight to TidStoreSetBlockOffsets(), which has an
> explicit contract:
>
> "The offset numbers 'offsets' must be sorted in ascending order."
>
> array_agg() without ORDER BY gives no such guarantee, and plan shapes
> that reshuffle the input can deliver the offsets out of order and trip
> the Assert.
>
> The issue is minor and doesn't expose any underlying bug, but it is
> still worth fixing: it removes a source of flaky test runs and makes
> life easier for extension developers who reuse the same pattern.
>
> Patch attached.

Thank you for the report.

Could you provide the reproducer of the assertion failure? IIRC there
have not been such reports on the community so far and the test should
be included in the patch anyway.

Regards,

-- 
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com






reply

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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: TRAP: failed Assert("offsets[i] > offsets[i - 1]"), File: "tidstore.c"
  In-Reply-To: <CAD21AoBVEcC5stzLr80RgaWuBh0EoyRQys_aeOz0ceogMVREcQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox