Re: [pgsql-advocacy] Unlogged vs. In-Memory

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Thom Brown <thom(at)linux(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Rob Wultsch <wultsch(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [pgsql-advocacy] Unlogged vs. In-Memory
Date: 2011-09-23 14:12:39
Message-ID: CA+TgmobPV8sS6Zq2REKrMq3U3Zqemb7jd5uBaDq3eawbWDxRTw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-hackers

[ moving to -hacker s]

On Thu, Sep 22, 2011 at 9:26 PM, Thom Brown <thom(at)linux(dot)com> wrote:
> On 22 September 2011 17:38, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
>>
>>> So are there any plans to allow swappable drive/volatile storage
>>> unlogged tables?
>>
>> Be our guest.  ;-)
>
> Oh it can't be that difficult.  On first glance it looks like it's a
> case of piggy-backing mdopen and getting it to treat
> RELPERSISTENCE_TEMP relations in the same way as it would for
> relations during the bootstrap script (i.e. create it if it doesn't
> exist)... then telling it not to try reading anything from the
> relation... or something like this.  But I don't know C so...
> *puppy-dog eyes*

I don't think that's it. It seems to me that what we really need to
do is put the _init forks in a different directory than all the other
forks (and then fix pg_upgrade to move them if upgrading from 9.1) -
so the core code change is actually in relpathbackend(). The question
is how you want to expose that to the user. I mean, you could just
put them in another directory under the rug, and call it good. Users
who know about the magic under the hood can fiddle with their mount
points, and everyone else will be none the wiser.

I'm not sure whether that's acceptable from a usability standpoint,
however. If you want to expose an SQL-level interface, this gets to
be a harder problem... starting with defining what exactly that
interface should look like.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Thom Brown 2011-09-23 14:37:12 Re: [pgsql-advocacy] Unlogged vs. In-Memory
Previous Message Thom Brown 2011-09-23 01:26:53 Re: Unlogged vs. In-Memory

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2011-09-23 14:31:37 Re: Re: [BUGS] BUG #6189: libpq: sslmode=require verifies server certificate if root.crt is present
Previous Message Alvaro Herrera 2011-09-23 13:55:43 Re: Re: [BUGS] BUG #6189: libpq: sslmode=require verifies server certificate if root.crt is present