Skip site navigation (1) Skip section navigation (2)

Re: Unlogged vs. In-Memory

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Thom Brown <thom(at)linux(dot)com>
Cc: Rob Wultsch <wultsch(at)gmail(dot)com>, Joshua Berkus <josh(at)agliodbs(dot)com>, PostgreSQL Advocacy <pgsql-advocacy(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Unlogged vs. In-Memory
Date: 2011-05-03 18:44:27
Message-ID: BANLkTinzAEi0ZWOejfG4gyq7+BaTcXChNA@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-advocacypgsql-hackers
On Tue, May 3, 2011 at 20:06, Thom Brown <thom(at)linux(dot)com> wrote:
> On 3 May 2011 19:02, Rob Wultsch <wultsch(at)gmail(dot)com> wrote:
>> Can Unlogged tables be located on a table space mount on a ram fs
>> without hosing the instance if the server gets bounced?
>
> No more than anything else in a RAM filesystem.  There are of course
> battery-backed RAM disk devices people can use, but those are a
> special case.

I think you're missing the scenario Rob is talking about. I think he
mentions the sequence:

CREATE TABLESPACE junk LOCATION '/tmp/junk';
CREATE UNLOGGED TABLE meh(a int) TABLESPACE junk;
<stop server>
rm -rf /tmp/junk/*
<start server>
postgres=# select * from meh;
ERROR:  could not open file
"pg_tblspc/16434/PG_9.1_201104251/12008/16435": No such file or
directory

Now if the tablespace contains *only* unlogged tables, it should at
least theoretically be possible to recover from this situation on
startup, I think. But it's not now. Anybody have an idea about how
much work that would be?

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

pgsql-hackers by date

Next:From: Magnus HaganderDate: 2011-05-03 18:45:56
Subject: Re: Unlogged vs. In-Memory
Previous:From: Tom LaneDate: 2011-05-03 18:41:27
Subject: Re: Prefered Types

pgsql-advocacy by date

Next:From: Magnus HaganderDate: 2011-05-03 18:45:56
Subject: Re: Unlogged vs. In-Memory
Previous:From: Joshua KramerDate: 2011-05-03 18:28:27
Subject: Re: Unlogged vs. In-Memory

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group