Re: read-only UNLOGGED tables - Mailing list pgsql-general

From Gianni Ciolli
Subject Re: read-only UNLOGGED tables
Date
Msg-id 20110331081951.GA16433@albo.gi.lan
Whole thread Raw
In response to read-only UNLOGGED tables  (Leonardo Francalanci <m_lists@yahoo.it>)
Responses Re: read-only UNLOGGED tables
List 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.ciolli@2ndquadrant.it | www.2ndquadrant.it

pgsql-general by date:

Previous
From: Leonardo Francalanci
Date:
Subject: read-only UNLOGGED tables
Next
From: Julia Jacobson
Date:
Subject: Re: Linking against static libpq using Visual C++