Обсуждение: How do I store tables on a remote host?

Поиск
Список
Период
Сортировка

How do I store tables on a remote host?

От
Sergey Samokhin
Дата:
Hello.

Is this possible to move a table from one machine to another and then
redirect queries involving this table to the remote host in a
transparent way?

As I have just read, tablespaces let us define where given tables
should be stored on the file system. What I'm looking for is like
tablespaces, but with the ability to use a remote host as location.

Although it of course will make any queries that need remote tables to
look at slower, I think it's a good idea to move, say, old fragments
of table containing log entries to remote machines.

An exotic idea to use both remote file systems and tablepaces has just
come to my mind, but I have a feel that there may be an analouge built
into PG.

Thanks.

--
Sergey Samokhin

Re: How do I store tables on a remote host?

От
Scott Marlowe
Дата:
On Thu, Sep 3, 2009 at 6:10 PM, Sergey Samokhin<prikrutil@gmail.com> wrote:
> Hello.
>
> Is this possible to move a table from one machine to another and then
> redirect queries involving this table to the remote host in a
> transparent way?
>
> As I have just read, tablespaces let us define where given tables
> should be stored on the file system. What I'm looking for is like
> tablespaces, but with the ability to use a remote host as location.

The way to do it that makes me cringe, would be to remote mount (NFS,
CIFS) another file system from a remote machine and put the table
there.

The better way is probably to look up pl/proxy and use that.

Re: How do I store tables on a remote host?

От
Sergey Samokhin
Дата:
Hello.

> The better way is probably to look up pl/proxy and use that.

Thanks, I will try it! I wrote the original mesage because remote file
systems aren't what seems to be fast enough when it comes to forward
queries...

For those looking for the same thing, here are links to PL/Proxy I've found:

https://developer.skype.com/SkypeGarage/DbProjects/PlProxy
http://pgfoundry.org/projects/plproxy/

--
Sergey Samokhin