Re: Incremental View Maintenance, take 2

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Incremental View Maintenance, take 2
Date: 2023-07-02 02:38:20
Message-ID: CACJufxF-HGe9zLaGaSryeYVq9abz2FyKKtdgghNWktkjnFXOJQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

ok. Now I really found a small bug.

this works as intended:
BEGIN;
CREATE INCREMENTAL MATERIALIZED VIEW test_ivm AS SELECT i, MIN(j) as
min_j FROM mv_base_a group by 1;
INSERT INTO mv_base_a select 1,-2 where false;
rollback;

however the following one:
BEGIN;
CREATE INCREMENTAL MATERIALIZED VIEW test_ivm1 AS SELECT MIN(j) as
min_j FROM mv_base_a;
INSERT INTO mv_base_a select 1, -2 where false;
rollback;

will evaluate
tuplestore_tuple_count(new_tuplestores) to 1, it will walk through
IVM_immediate_maintenance function to apply_delta.
but should it be zero?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Miroslav Bendik 2023-07-02 04:02:08 Re: Incremental sort for access method with ordered scan support (amcanorderbyop)
Previous Message Thomas Munro 2023-07-02 02:09:07 Re: possible bug in handling of contrecords in dd38ff28ad (Fix recovery_prefetch with low maintenance_io_concurrency)