RE: Implementing Incremental View Maintenance

From: "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>
To: 'Yugo Nagata' <nagata(at)sraoss(dot)co(dot)jp>
Cc: 'legrand legrand' <legrand_legrand(at)hotmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: Implementing Incremental View Maintenance
Date: 2019-12-23 08:08:53
Message-ID: OSAPR01MB5073E1044ADEC2D0E0866392FE2E0@OSAPR01MB5073.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
> 1. Create a temporary table only once at the first view maintenance in
> this session. This is possible if we store names or oid of temporary
> tables used for each materialized view in memory. However, users may
> access to these temptables whenever during the session.
>
> 2. Use tuplestores instead of temprary tables. Tuplestores can be
> converted to Ephemeral Name Relation (ENR) and used in queries.
> It doesn't need updating system catalogs, but indexes can not be
> used to access.

How about unlogged tables ? I thought the point of using a temp table is to avoid WAL overhead.

One concern about the temp table is that it precludes the use of distributed transactions (PREPARE TRANSACTION fails if the transaction accessed a temp table.) This could become a headache when FDW has supported 2PC (which Sawada-san started and Horicuchi-san has taken over.) In the near future, PostgreSQL may evolve into a shared nothing database with distributed transactions like Postgres-XL.

Regards
Takayuki Tsunakawa

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2019-12-23 08:13:19 Re: Implementing Incremental View Maintenance
Previous Message tsunakawa.takay@fujitsu.com 2019-12-23 07:43:23 RE: Implementing Incremental View Maintenance