Re: BUG #19463: Server crash (Assertion failure) when using MERGE statement in CTE

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: 303677365(at)qq(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19463: Server crash (Assertion failure) when using MERGE statement in CTE
Date: 2026-04-27 23:20:55
Message-ID: CAApHDvpvGj_xt=Asmrinq3WsdXby+mxi5UQp+TwUTB=84+pm0A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, 21 Apr 2026 at 02:05, PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
> PostgreSQL version: 15.0

You're reporting a bug on a PostgreSQL version that's missing 3.5
years of bug fixes. 15.17 is the latest minor version for the
PostgreSQL 15 release. Please always test with the latest minor
version of the major release before submitting bug reports. If you can
reproduce in a previous minor version, but not on the latest, then
this is likely because the bug has already been fixed. You need not
report these.

> Using a MERGE statement as a Common Table Expression (CTE) causes the
> PostgreSQL server to crash with an assertion failure. The assertion in
> `transformWithClause` does not recognize `MergeStmt` as a valid
> data-modifying statement type.
>
> ## PostgreSQL Version
>
> ```
> PostgreSQL 15devel on x86_64-pc-linux-gnu, compiled by clang version 17.0.6,
> 64-bit
> ```
>
> Tested on REL_15_STABLE branch.

Looks like you must be trying that on a very outdated REL_15_STABLE.
If it's tagged as 15devel, then that's from before the 15.0 release.
Please update your git repo (git pull) and try with REL_15_17.

I tried on 15.0 and 15.17 and cannot reproduce the assert failure
you're seeing. So it looks like whatever you've found was fixed before
the 15.0 release.

David

In response to

Browse pgsql-bugs by date

  From Date Subject
Previous Message Christophe Pettus 2026-04-27 22:51:12 Re: uuidv7 improperly accepts dates before 1970-01-01