Re: TABLESPACE and directory for Foreign tables?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: TABLESPACE and directory for Foreign tables?
Date: 2014-05-05 17:53:46
Message-ID: 11302.1399312426@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus <josh(at)agliodbs(dot)com> writes:
> I'm working with the cstore_fdw project, which has an interesting
> property for an FDW: the FDW itself creates the files which make up the
> database. This raises a couple of questions:

> 1) Do we want to establish a standard directory for FDWs which create
> files, such as $PGDATA/base/{database-oid}/fdw/ ? Or would we want to
> leave it up to each FDW to decide?

I think we ought to vigorously discourage FDWs from storing any files
inside $PGDATA. This cannot lead to anything except grief. Just for
starters, what will operations such as pg_basebackup do with them?

A larger and more philosophical point is that such a direction of
development could hardly be called a "foreign" data wrapper. People
would expect Postgres to take full responsibility for such files,
including data integrity considerations such as fsync-at-checkpoints
and WAL support. Even if we wanted the FDW abstractions to allow
for that, we're very far away from it. And frankly I'd maintain
that FDW is the wrong abstraction.

> 2) Do we want to support the TABLESPACE directive for FDWs?

A fortiori, no.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-05-05 17:58:57 Re: 9.4 release notes
Previous Message Andres Freund 2014-05-05 17:53:41 Re: New and interesting replication issues with 9.2.8 sync rep