Re: BUG #18885: ERROR: corrupt MVNDistinct entry - 2 - Mailing list pgsql-bugs

From Tomas Vondra
Subject Re: BUG #18885: ERROR: corrupt MVNDistinct entry - 2
Date
Msg-id afb124fc-f595-4681-bae8-e11c1ff52305@vondra.me
Whole thread Raw
In response to Re: BUG #18885: ERROR: corrupt MVNDistinct entry - 2  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: BUG #18885: ERROR: corrupt MVNDistinct entry - 2
List pgsql-bugs

On 4/16/25 06:11, David Rowley wrote:
> On Wed, 16 Apr 2025 at 01:16, Tomas Vondra <tomas@vondra.me> wrote:
>> In any case, such rework seems out of scope for PG18 - it's much more
>> than a fix for the bug.
> 
> This is the reason I stopped short of adjusting the code in the patch
> I proposed in [1].  Speaking of which, do you have any views on that?
> It seems much more likely that someone would have caught the issue
> being reported here when writing the patch or during review if there
> was some sort of documentation to mention the function can't handle
> duplicate GroupVarInfos.
> 
> I'll look at that patch again in the next few days with aims to push
> it unless someone has something to say about it.
> 

Yeah, you're right the estimate_multivariate_ndistinct() comments should
have mentioned that the GroupVarInfos are expected to be unique ... and
perhaps there could have been some assert to check that.


regards

-- 
Tomas Vondra




pgsql-bugs by date:

Previous
From: Shlok Kyal
Date:
Subject: Re: BUG #18897: Logical replication conflict after using pg_createsubscriber under heavy load
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: Disabled logical replication origin session causes primary key errors