Re: Incremental View Maintenance, take 2

From: Kirill Reshke <reshkekirill(at)gmail(dot)com>
To: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Incremental View Maintenance, take 2
Date: 2024-08-20 07:06:24
Message-ID: CALdSSPg1mPiZRXjFEsz3h_5Jue0rq0w9BJzBrcVtwz5J29d_3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 20 Aug 2024 at 02:14, Kirill Reshke <reshkekirill(at)gmail(dot)com> wrote:
>
>
> == Major suggestions.
>
> 1) At first glance, working with this IVM/IMMV infrastructure feels
> really unintuitive about what servers actually do for query execution.
> I do think It will be much better for user experience to add more
> EXPLAIN about IVM work done inside IVM triggers. This way it is much
> clearer which part is working slow, so which index should be created,
> etc.
>
> 2) The kernel code for IVM lacks possibility to be extended for
> further IVM optimizations. The one example is foreign key optimization
> described here[1]. I'm not saying we should implement this within this
> patchset, but we surely should pave the way for this. I don't have any
> good suggestions for how to do this though.
>
> 3) I don't really think SQL design is good. CREATE [INCREMENTAL] M.V.
> is too ad-hoc. I would prefer CREATE M.V. with (maintain_incr=true).
> (reloption name is just an example).
> This way we can change regular M.V. to IVM and vice versa via ALTER
> M.V. SET *reloptions* - a type of syntax that is already present in
> PostgreSQL core.
>

One little follow-up here. Why do we do prepstate visibility the way
it is done? Can we instead export the snapshot in BEFORE trigger, save
it somewhere and use it after?

--
Best regards,
Kirill Reshke

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Maxim Orlov 2024-08-20 07:29:42 Re: Test 041_checkpoint_at_promote.pl faild in installcheck due to missing injection_points
Previous Message John Naylor 2024-08-20 07:03:13 Re: Doc limitation update proposal: include out-of-line OID usage per TOAST-ed columns