Re: switch UNLOGGED to LOGGED

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Leonardo Francalanci <m_lists(at)yahoo(dot)it>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: switch UNLOGGED to LOGGED
Date: 2011-04-18 16:30:22
Message-ID: 1303144130-sup-7512@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Excerpts from Leonardo Francalanci's message of lun abr 18 09:36:13 -0300 2011:
> I think I coded a very basic version of the UNLOGGED to LOGGED patch
> (only wal_level=minimal case for the moment).
>
> To remove the INIT fork, I changed somehow PendingRelDelete to have
> a flag "bool onlyInitFork" so that the delete would remove only the INIT
> fork at commit.
>
> Everything "works" (note the quotes...) except in the case of not-clean
> shutdown ("-m immediate" to pg_ctl stop). The reason is that the replay
> code doesn't have any idea that it has to remove only the INIT fork: it will
> remove ALL forks; so at the end of the redo procedure (at startup, after
> a "pg_ctl -m immediate stop") the table doesn't have any forks at all.

Maybe you should change xl_act_commit to have a separate list of rels to
drop the init fork for (instead of mixing those with the list of files to
drop as a whole).

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2011-04-18 16:33:13 Re: WIP: Allow SQL-language functions to reference parameters by parameter name
Previous Message Tom Lane 2011-04-18 16:12:15 Re: [JDBC] JDBC connections to 9.1