Re: making an unlogged table logged

From: Rob Wultsch <wultsch(at)gmail(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: making an unlogged table logged
Date: 2011-01-05 15:10:14
Message-ID: AANLkTim5BLcMNansK3oQtjge+EDihLr6EHk8X65mqyeg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 5, 2011 at 7:48 AM, David Fetter <david(at)fetter(dot)org> wrote:
> On Wed, Jan 05, 2011 at 09:04:08AM -0500, Robert Haas wrote:
>> On Tue, Jan 4, 2011 at 10:56 PM, Rob Wultsch <wultsch(at)gmail(dot)com> wrote:
>> > 1. Could the making a table logged be a non-exclusive lock if the
>> > ALTER is allowed to take a full checkpoint?
>>
>> No, that doesn't solve either of the two problems I described,
>> unfortunately.

That is too bad.

>>
>> > 2. Unlogged to logged has giant use case.
>>
>> Agree.
>>
>> > 3. In MySQL I have had to ALTER tables to engine BLACKHOLE because
>> > they held data that was not vital, but the server was out of IO.
>> > Going logged -> unlogged has a significant placed, I think.
>>
>> Interesting.  So you'd change a logged table into an unlogged table
>> to cut down on I/O, and take the risk of losing the data if the
>> server went down?
>
> BLACKHOLE is a "storage engine" that's equivalent to /dev/null, so it
> wasn't a risk /per se/.
>

Exactly. It was data I could live without and by having schema
attached to /dev/null the application did not error out and die. It is
a very bad option and being able to turn off logging for a table is a
much better one.

--
Rob Wultsch
wultsch(at)gmail(dot)com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stefan Kaltenbrunner 2011-01-05 15:32:51 Re: Streaming base backups
Previous Message David Fetter 2011-01-05 14:48:16 Re: making an unlogged table logged