Re: read-only UNLOGGED tables

From: Gianni Ciolli <gianni(dot)ciolli(at)2ndquadrant(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: read-only UNLOGGED tables
Date: 2011-03-31 08:19:52
Message-ID: 20110331081951.GA16433@albo.gi.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 31, 2011 at 08:57:09AM +0100, Leonardo Francalanci wrote:
> Hi,
>
> we're inserting tons of rows in some partitioned tables, and to get
> more performance out of the system we would like to use UNLOGGED
> tables that, after some time, become "regular" tables (at that point, we
> wouldn't want to write to them anymore; we could only select or drop
> them). Would it be a feature that can be added in the future, assuming
> that the tables would then flagged somehow as "read only"?

I suppose that a similar effect could be achieved by something like

CREATE TABLE mytable_logged AS
SELECT * FROM mytable_unlogged;

which would not produce WAL:

http://developer.postgresql.org/pgdocs/postgres/populate.html#POPULATE-PITR

unless of course you are using PITR or replication, in which case you
surely want your table to be logged at some point anyway.

Cheers,
Dr. Gianni Ciolli - 2ndQuadrant Italia
PostgreSQL Training, Services and Support
gianni(dot)ciolli(at)2ndquadrant(dot)it | www.2ndquadrant.it

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Zheng Yang 2011-03-31 08:55:29 Re: foreign data wrappers
Previous Message Leonardo Francalanci 2011-03-31 07:57:09 read-only UNLOGGED tables