public inbox for [email protected]
help / color / mirror / Atom feedFrom: Yugo Nagata <[email protected]>
To: [email protected] <[email protected]>
Cc: 'legrand legrand' <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Implementing Incremental View Maintenance
Date: Thu, 26 Dec 2019 11:36:47 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <OSAPR01MB50732465353599538456CD2EFE290@OSAPR01MB5073.jpnprd01.prod.outlook.com>
References: <[email protected]>
<[email protected]>
<[email protected]>
<CA+HiwqFHvD5ZuewZ+srr+er6yoZu9tD_Pdjxu8G2vBvKPyQe=Q@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<OSAPR01MB507311815C5BD1A7853AF8C4FE2E0@OSAPR01MB5073.jpnprd01.prod.outlook.com>
<[email protected]>
<OSAPR01MB5073E1044ADEC2D0E0866392FE2E0@OSAPR01MB5073.jpnprd01.prod.outlook.com>
<[email protected]>
<OSAPR01MB50732465353599538456CD2EFE290@OSAPR01MB5073.jpnprd01.prod.outlook.com>
On Tue, 24 Dec 2019 07:07:35 +0000
"[email protected]" <[email protected]> wrote:
> From: Yugo Nagata <[email protected]>
> > On Mon, 23 Dec 2019 08:08:53 +0000
> > "[email protected]" <[email protected]> wrote:
> > > How about unlogged tables ? I thought the point of using a temp table is to
> > avoid WAL overhead.
> >
> > Hmm... this might be another option. However, if we use unlogged tables,
> > we will need to create them in a special schema similar to pg_toast
> > to split this from user tables. Otherwise, we need to create and drop
> > unlogged tables repeatedly for each session.
>
> Maybe we can create the work tables in the same schema as the materialized view, following:
>
> * Prefix the table name to indicate that the table is system-managed, thus alluding to the user that manually deleting the table would break something. This is like the system attribute __imv_count you are proposing.
>
> * Describe the above in the manual. Columns of serial and bigserial data type similarly create sequences behind the scenes.
>
> * Make the work tables depend on the materialized view by recording the dependency in pg_depend, so that Dropping the materialized view will also drop its work tables.
Maybe it works, but instead of using special names for work tables, we can also create
a schema whose name is special and place work tables in this. This will not annoy users
with information they are not interested in when, for example, psql meta-commands like
\d are used.
Anyway, I understood it is better to avoid creating and dropping temporary tables
during view maintenance per statement.
--
Yugo Nagata <[email protected]>
view thread (215+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Implementing Incremental View Maintenance
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox