Re: Allow isolation test steps to be declared inline.

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Allow isolation test steps to be declared inline.
Date: 2026-11-22 14:11:59
Message-ID: CAEZATCXykBYe1Dx7MFDdEQE8PgV7o1WUWZTv2yuSsDnwXv5OjQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 21 Nov 2026 at 15:26, Andrey Borodin <x4mmm(at)yandex-team(dot)ru> wrote:
>
> I like this idea.

Thanks for looking!

> If a new permutation needs SQL already used by an
> inline step, it would be useful to name that step where it first
> appears, without moving it back into the session declaration.
>
> Could inline steps optionally have names for reuse in later
> permutations? I see that mixing inline and existing named steps is
> already supported.

Hmm, I did think about allowing inline steps to optionally have names,
but for a different reason -- when a step has a parenthesised marker
referring to another inline step to use as a blocking condition, it
would be better if that other step could be given a name, rather than
relying on the generated name, which can change if more steps are
added in between. In the end, I didn't bother because I wanted to keep
the patch simple, and I don't think markers / blocking conditions are
widely used.

However, if inline steps are allowed to have names, it seems more
natural that they be scoped to the containing permutation. If they're
available globally to other permutations, then they're not much
different from named steps defined in session blocks. Perhaps a new
syntax could be invented to allow additional steps to be added to
existing sessions closer to the permutations that need them.

For now though, I'd rather not over-complicate this.

Regards,
Dean

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Xuneng Zhou 2026-11-22 14:08:32 Re: FATAL: could not send end-of-streaming message to primary: no COPY in progress