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

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Yuri Zamyatin <yuri(at)yrz(dot)am>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19078: Segfaults in tts_minimal_store_tuple() following pg_upgrade
Date: 2025-10-17 22:58:19
Message-ID: CAApHDvrYwVkFNbOxCnkYHuqp6whM41PSznns0Sc70rqQ2Ej-XA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, 18 Oct 2025 at 11:24, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
>
> On Sat, 18 Oct 2025 at 11:18, Yuri Zamyatin <yuri(at)yrz(dot)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

Attachment Content-Type Size
v1-0001-Fix-reset-of-incorrect-hash-iterator-in-GROUPING-.patch application/octet-stream 1.9 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Yuri Zamyatin 2025-10-18 00:40:39 Re: BUG #19078: Segfaults in tts_minimal_store_tuple() following pg_upgrade
Previous Message David Rowley 2025-10-17 22:24:01 Re: BUG #19078: Segfaults in tts_minimal_store_tuple() following pg_upgrade