Re: switch UNLOGGED to LOGGED

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Leonardo Francalanci <m_lists(at)yahoo(dot)it>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: switch UNLOGGED to LOGGED
Date: 2011-04-10 11:25:55
Message-ID: BANLkTinQx-85Z5gMPS2u37GtGzDsJXvRww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Apr 9, 2011 at 3:29 AM, Leonardo Francalanci <m_lists(at)yahoo(dot)it> wrote:
>> I'm pretty sure we wouldn't accept a patch for a  feature that would
>> only work with wal_level=minimal, but it might be a useful  starting
>> point for someone else to keep hacking on.
>
> I understand.
>
> Reading your post at
> http://archives.postgresql.org/pgsql-hackers/2011-01/msg00315.php
> I thought I got the part:
>
> "what happens if we *crash* without writing an abort record?  It
> seems  like that could leave a stray file around on a standby,
> because the  current code only cleans things up on the standby
> at the start of  recovery"
>
> But re-reading it, I don't understand: what's the difference in creating
> a new "regular" table and crashing before emitting the abort record,
> and converting an unlogged table to logged and crashing before
> emitting the abort record? How do the standby servers handle a
> "CREATE TABLE" followed by a ROLLBACK if the master crashes
> before writing the abort record? I thought that too would "leave a
> stray file around on a standby".

I've been thinking about the same thing. And AFAICS, your analysis is
correct, though there may be some angle to it I'm not seeing.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-04-10 11:35:53 Re: BUG #5856: pg_attribute.attinhcount is not correct.
Previous Message Magnus Hagander 2011-04-10 10:46:45 Re: Feature request: pg_basebackup --force