Re: Unlogged tables, persistent kind - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Unlogged tables, persistent kind
Date
Msg-id BANLkTi=gVYWOcw4rpyvfSdJPH6PHo0Rs1w@mail.gmail.com
Whole thread Raw
In response to Re: Unlogged tables, persistent kind  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Unlogged tables, persistent kind  (Christopher Browne <cbbrowne@gmail.com>)
Re: Unlogged tables, persistent kind  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
On Sun, Apr 24, 2011 at 10:27 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Simon Riggs <simon@2ndQuadrant.com> writes:
>> If you don't log changes to tables you have two choices if we crash
>> 1) truncate the table and any indexes
>> 2) rebuild any indexes damaged by the crash
>
> No, you have only one choice, and that's (1), because there's no
> guarantee that what's in the table file is meaningful.

>> Heap blocks would be zeroed if they were found to be damaged, following a crash.
>
> This is sheerest fantasy.  And even if you could implement it, what sort
> of feature would you be offering?  "Your data is preserved except when
> it isn't"?  People who want that can go use mysql.

AFAIUI, a great many people do.

I am proposing a non-default mode, requiring explicit activation by
user which preserves as much data as possible. I am fully aware that
what is proposed is not an optimisation, but a downgrading of normal
resilience in exchange for some data loss in the event of a crash.

Yes, many other systems support this and people are becoming persuaded
that such risk/reward choices make sense for them.
I see no reason not to provide an option to do this, so people can
make informed choices.

For large sets of low value data, it makes sense. Deleting all data,
just simply because some of it might be damaged, is not the only
option. IMHO deleting all the data is a surprising option that will
cause many people to curse us. I don't see preserving some of the data
as being worse.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Extension Packaging
Next
From: "David E. Wheeler"
Date:
Subject: Re: Extension Packaging