Re: BUG #19078: Segfaults in tts_minimal_store_tuple() following pg_upgrade

David Rowley <dgrowleyml@gmail.com>

From: David Rowley <dgrowleyml@gmail.com>
To: Yuri Zamyatin <yuri@yrz.am>
Cc: Jeff Davis <pgsql@j-davis.com>, Amit Langote <amitlangote09@gmail.com>, pgsql-bugs@lists.postgresql.org
Date: 2025-10-17T22:58:19Z
Lists: pgsql-bugs

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix reset of incorrect hash iterator in GROUPING SETS queries

  2. Fix EPQ crash from missing partition directory in EState

Attachments

On Sat, 18 Oct 2025 at 11:24, David Rowley <dgrowleyml@gmail.com> wrote:
>
> On Sat, 18 Oct 2025 at 11:18, Yuri Zamyatin <yuri@yrz.am> wrote:
> > Nice, should I still try to reproduce the bug
> > with assertions and the patch you provided?
>
> I think I've got it. I can get the Asserts in the patch to fail with:
>
> drop table if exists ab;
> create table ab (a int, b int);
> insert into ab select x%2,x%99 from generate_series(1,1001)x;
>
> select a,b,count(*) from ab group by grouping sets(b,a,(a,b),a,b);

Here's a patch which I think should fix the issue. It'd be great if
you could patch with that and ensure that there's no more crashing.

Many thanks for assisting with this.

David