Re: GSoC proposal - "make an unlogged table logged" - Mailing list pgsql-hackers

From Andres Freund
Subject Re: GSoC proposal - "make an unlogged table logged"
Date
Msg-id 20140403110454.GA17307@awork2.anarazel.de
Whole thread Raw
In response to Re: GSoC proposal - "make an unlogged table logged"  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
On 2014-04-01 20:39:35 +0300, Heikki Linnakangas wrote:
> On 03/07/2014 05:36 AM, Tom Lane wrote:
> >Fabrízio de Royes Mello <fabriziomello@gmail.com> writes:
> >>Do you think is difficult to implement "ALTER TABLE ... SET UNLOGGED" too?
> >>Thinking in a scope of one GSoC, of course.
> >
> >I think it's basically the same thing.  You might hope to optimize it;
> >but you have to create (rather than remove) an init fork, and there's
> >no way to do that in exact sync with the commit.
> 
> You just have to include that information with the commit WAL record, no?

Sure, it's possible to do that. But that seems like complicating generic
paths more than I'd like for a minor feature. Especially as the
unlinking of the files would need to happen somewhere in
RecordTransactionCommit(). After the XLogFlush(), but before unsetting
MyPgXact->delayChkpt. That's a crit section, right?

Greetings,

Andres Freund

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



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: GSoC proposal - "make an unlogged table logged"
Next
From: Heikki Linnakangas
Date:
Subject: Re: GSoC proposal - "make an unlogged table logged"