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 18:53:50
Message-ID: 19854.1399316030@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:
> On 05/05/2014 10:53 AM, Tom Lane wrote:
>> 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.

> Certainly pluggable storage would be a better abstraction; but we don't
> have that yet. In the meantime, we have one FDW which creates files
> *right now*, and we might have more in the future, so I'm trying to
> establish some guidelines as to how such FDWs should behave.

The guideline is simple: don't do that. We should absolutely not
encourage this until/unless we have infrastructure to support it.
Just because one FDW author thought this would be a cool thing to do
does not make it a cool thing to do, and definitely not a cool thing
to encourage others to emulate.

> Regardless
> of whether or not you think FDWs should be managing files, it's better
> for users if all FDWs which manage files manage them in the same way.

Sure. They should all keep them outside $PGDATA, making it not-our-
problem. When and if we're prepared to consider it our problem, we
will be sure to advise people.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-05-05 19:04:07 Re: pg_shmem_allocations view
Previous Message Josh Berkus 2014-05-05 18:52:12 Re: New and interesting replication issues with 9.2.8 sync rep