Re: Row pattern recognition

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: assam258(at)gmail(dot)com
Cc: jacob(dot)champion(at)enterprisedb(dot)com, david(dot)g(dot)johnston(at)gmail(dot)com, vik(at)postgresfriends(dot)org, er(at)xs4all(dot)nl, peter(at)eisentraut(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Row pattern recognition
Date: 2026-01-15 08:25:52
Message-ID: 20260115.172552.916561597588012221.ishii@postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Henson,

The merged v38 patch passed CI check:
https://cirrus-ci.com/github/postgresql-cfbot/postgresql/cf%2F4460

Congratulations!

>> Summary of changes:
>
> Will check.

I have one question regaring your patch.

In update_reduced_frame():
+ hasLimitedFrame = (frameOptions & FRAMEOPTION_ROWS) &&
+ !(frameOptions & FRAMEOPTION_END_UNBOUNDED_FOLLOWING);
+ if (hasLimitedFrame && winstate->endOffsetValue != 0)
+ frameOffset = DatumGetInt64(winstate->endOffsetValue);

frameOffset is a offset value n from "ROWS BETWEEN CURRENT ROW AND n FOLLOWING".
Later you use this here:

+ ctxFrameEnd = ctx->matchStartRow + frameOffset + 1;

So my question is, how do you ensure that ctxFrameEnd does not go
beyond the full window frame end?

Best regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kirill Reshke 2026-01-15 08:35:30 Re: Fix gistkillitems & add regression test to microvacuum
Previous Message Kirill Reshke 2026-01-15 08:21:51 Re: Fix gistkillitems & add regression test to microvacuum