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

From Heikki Linnakangas
Subject Re: GSoC proposal - "make an unlogged table logged"
Date
Msg-id 533D3A25.8020901@vmware.com
Whole thread Raw
In response to Re: GSoC proposal - "make an unlogged table logged"  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: GSoC proposal - "make an unlogged table logged"
Re: GSoC proposal - "make an unlogged table logged"
List pgsql-hackers
On 04/01/2014 08:58 PM, Andres Freund wrote:
> On 2014-04-01 12:56:04 -0500, Jim Nasby wrote:
>> On 3/4/14, 8:50 AM, Andres Freund wrote:
>>> Can't that be solved by just creating the permanent relation in a new
>>> relfilenode? That's equivalent to a rewrite, yes, but we need to do that
>>> for anything but wal_level=minimal anyway.
>>
>> Maybe I'm missing something, but doesn't this actually involve writing the data twice? Once into WAL and again into
therelation itself?
 
>
> Yes. But as I said, that's unavoidable for anything but
> wal_level=minimal.

Ideally, you would *only* write the data to WAL, when you do ALTER TABLE 
... SET LOGGED. There's no fundamental reason you need to rewrite the 
heap, too. I understand that it might be difficult to do, because of the 
way the system catalogs work, but it's worthy goal.

- Heikki



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Doing better at HINTing an appropriate column within errorMissingColumn()
Next
From: Andres Freund
Date:
Subject: Re: GSoC proposal - "make an unlogged table logged"