Re: unlogged tables - Mailing list pgsql-performance

From Jeff Janes
Subject Re: unlogged tables
Date
Msg-id CAMkU=1wdMTE2w4iV2eLsA6rWXxzdkxFXE47ooGFE0-z1CjrY1g@mail.gmail.com
Whole thread Raw
In response to Re: unlogged tables  (Yves Dorfsman <yves@zioup.com>)
List pgsql-performance
On Tue, Apr 14, 2015 at 8:41 AM, Yves Dorfsman <yves@zioup.com> wrote:
On 2015-04-13 17:49, Jeff Janes wrote:
>
> One way would be to lock dirty buffers from unlogged relations into
> shared_buffers (which hardly seems like a good thing) until the start of a
> "super-checkpoint" and then write them all out as fast as possible (which kind
> of defeats checkpoint_completion_target).  And then if the crash happened
> during a super-checkpoint, the data would still be inconsistent and need to be
> truncated.
>

What do you call a "super-checkpoint"?

A hypothetical checkpoint which includes writing and flushing pages of unlogged tables.

Presumably you wouldn't want every checkpoint to do this, because if done the way I described the super-checkpoint is a vulnerable period.  Crashes that happen during it would result in truncation of the unlogged relation.  Since that is the very thing we want to avoid, you would want to make these vulnerable periods rare.

Cheers,

Jeff

pgsql-performance by date:

Previous
From: dgabriel
Date:
Subject: Re: unlogged tables
Next
From: Jeff Janes
Date:
Subject: Re: unlogged tables