Re: switch UNLOGGED to LOGGED - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: switch UNLOGGED to LOGGED
Date
Msg-id 1303144130-sup-7512@alvh.no-ip.org
Whole thread Raw
In response to Re: switch UNLOGGED to LOGGED  (Leonardo Francalanci <m_lists@yahoo.it>)
Responses Re: switch UNLOGGED to LOGGED  (Leonardo Francalanci <m_lists@yahoo.it>)
List 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@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [JDBC] JDBC connections to 9.1
Next
From: Alvaro Herrera
Date:
Subject: Re: WIP: Allow SQL-language functions to reference parameters by parameter name