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

From Robert Haas
Subject Re: [pgsql-advocacy] Unlogged vs. In-Memory
Date
Msg-id CA+TgmobPV8sS6Zq2REKrMq3U3Zqemb7jd5uBaDq3eawbWDxRTw@mail.gmail.com
Whole thread Raw
Responses Re: [pgsql-advocacy] Unlogged vs. In-Memory
List pgsql-hackers
[ moving to -hacker s]

On Thu, Sep 22, 2011 at 9:26 PM, Thom Brown <thom@linux.com> wrote:
> On 22 September 2011 17:38, Josh Berkus <josh@agliodbs.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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Re: [BUGS] BUG #6189: libpq: sslmode=require verifies server certificate if root.crt is present
Next
From: Magnus Hagander
Date:
Subject: Re: Re: [BUGS] BUG #6189: libpq: sslmode=require verifies server certificate if root.crt is present