Re: unlogged tables

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: dgabriel <gabriel(dot)dodan(at)gmail(dot)com>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: unlogged tables
Date: 2015-04-14 20:34:27
Message-ID: 552D79D3.4040801@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 4/14/15 10:56 AM, dgabriel wrote:
> David G Johnston wrote
>> 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?
>
> If is possible to restore the table at last checkpoint state that will be
> more than enough. I don't care about the changes since last checkpoint, I am
> willing to lose those changes. There are use cases where is acceptable to
> lose some data, for example in a cache system, it is not a big issue if we
> lose some cached data.

It is not. Unless you ensure that data is written to WAL (on disk)
BEFORE it is written to the data pages, you will probably have
corruption after a crash, and have no way to prevent or possibly even
detect the corruption.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Andreas Joseph Krogh 2015-04-15 01:46:34 Performance of vacuumlo
Previous Message Josh Berkus 2015-04-14 19:58:32 Re: Some performance testing?