Re: unlogged tables - Mailing list pgsql-performance

From David G. Johnston
Subject Re: unlogged tables
Date
Msg-id CAKFQuwYtdCF1BFx7pji78tshjUD-oVCoOOnBcr935_tq5gY-Ag@mail.gmail.com
Whole thread Raw
In response to Re: unlogged tables  (Matheus de Oliveira <matioli.matheus@gmail.com>)
Responses Re: unlogged tables  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Re: unlogged tables  (Jeff Janes <jeff.janes@gmail.com>)
Re: unlogged tables  (dgabriel <gabriel.dodan@gmail.com>)
List pgsql-performance
On Monday, April 13, 2015, Matheus de Oliveira <matioli.matheus@gmail.com> wrote:

On Mon, Apr 13, 2015 at 4:31 PM, dgabriel <gabriel.dodan@gmail.com> wrote:
"In the event of a normal shutdown, we can flush all the writes to disk
so we know all the data has been written, so there is no need to truncate."

Isn't possible to periodically flush data to disk and in case of crush
postgres to load only the data that existed at last flush? The periodic
flush could be configurable, for example every 30 minutes or after x rows
updated/inserted.

There is no such facility implemented for UNLOGGED TABLEs. That could be a feature request though.


Well, that is half right anyway.  UNLOGGED tables obey checkpoints just like any other table.  The missing feature is an option to leaved restored the last checkpoint.  Instead, not knowing whether there were changes since the last checkpoint, the system truncated the relation.

What use case is there for a behavior that the last checkpoint data is left on the relation upon restarting - not knowing whether it was possible the other data could have been written subsequent?

David J.

pgsql-performance by date:

Previous
From: Matheus de Oliveira
Date:
Subject: Re: unlogged tables
Next
From: Jim Nasby
Date:
Subject: Re: unlogged tables