Re: PostgreSQL as a filesystem - Mailing list pgsql-general

From Marco Colombo
Subject Re: PostgreSQL as a filesystem
Date
Msg-id 1113899949.12819.4.camel@frodo.esi
Whole thread Raw
In response to Re: PostgreSQL as a filesystem  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Mon, 2005-04-18 at 17:18 -0400, Tom Lane wrote:
> "Christopher Nelson" <paradox@BBHC.ORG> writes:
> > I'm developing a hobby OS and I'm looking into file systems.  I've
> > thought about writing my own, and that appeals, but I'm also very
> > interested in the database-as-a-filesystem paradigm.  It would be nice
> > to not have to write all of the stuff that goes into the DBMS (e.g.
> > parsers, query schedulers, etc) myself.
>
> > So I was wondering what sort of filesystem requirements Postgre has.
>
> There are DB's you could use for this, but Postgres (not "Postgre",
> please, there is no such animal) isn't one of them :-(.  We really
> assume we are sitting on top of a full-spec file system --- we want
> space management for variable-size files, robust storage of directory
> information, etc.

I've been thinking of it, too. I think no filesystem out there is really
optimized for a steady write load with many fsyncs, that is, is really
transaction-oriented on the data side (journalled ones may implement
real transactions for meta-data, but only for it). Out of curiosity,
do you have any feedback from filesystem people, are they interested in
optimizing for the kind of workload (expecially on write) a database
generates? I ask for it seems to me it's a corner case to them, or even
a degenerated one. I'm not aware of _any_ comparative benchmarch among
different filesystems that is based on write+fsync load, for one.

Using a DB as filesystem at OS level is a different matter, of course.

Christopher, you may have a look at FUSE.
http://fuse.sourceforge.net/

It may help in both developing a new filesystem and in understanding
how it works under Linux (with a nice separation of userspace and
kernelspace). I think you could even write one based on PostgreSQL,
but it won't help much, since PostgreSQL needs a filesystem to work.
But if your OS has TCP/IP, it could be interesting anyway.

Note that I'm not aware of any other way to access PostgreSQL than
sockets, so you need those at least. There's no standalone library
you can link to in order to access database files, AFAIK.

.TM.
--
      ____/  ____/   /
     /      /       /                   Marco Colombo
    ___/  ___  /   /                  Technical Manager
   /          /   /                      ESI s.r.l.
 _____/ _____/  _/                      Colombo@ESI.it


pgsql-general by date:

Previous
From: neo anderson
Date:
Subject: multibyte question
Next
From: Alexandre
Date:
Subject: Simplified (a-la [G|N]DBM) DB access