Обсуждение: Transactions in different DB

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

Transactions in different DB

От
"Stefano Farina"
Дата:
Hi all
I have to develop an embedded database using memory FLASH and memory RAM
Some tables must be saved in RAM and some tables in FLASH ( RAM and FLASH are two different mounted directories in the file system).
I saw it's possible to save different databases in different directories with CREATE DATABASE options.
 
It's possible to save only some tables in different directories??
 
If I want to work with two different databases, it's possible to do  a single transaction on two different databases ??
 
Thanks
 
Stefano Farina

Re: Transactions in different DB

От
Ian Barwick
Дата:
On Tue, 16 Nov 2004 11:22:27 +0100, Stefano Farina
<sfarina.stagedse@akhela.com> wrote:
>
> Hi all
> I have to develop an embedded database using memory FLASH and memory RAM
> Some tables must be saved in RAM and some tables in FLASH ( RAM and FLASH
> are two different mounted directories in the file system).
> I saw it's possible to save different databases in different directories
> with CREATE DATABASE options.
>
> It's possible to save only some tables in different directories??

Beginning with PostgreSQL 8.0, yes - this provides tablespaces.

> If I want to work with two different databases, it's possible to do  a
> single transaction on two different databases ??

Not AFAIK, though contrib/dblink might be able to help you.

HTH

Ian Barwick
barwick@gmail.com

Re: Transactions in different DB

От
Tino Wildenhain
Дата:
Hi,

Am Dienstag, den 16.11.2004, 11:22 +0100 schrieb Stefano Farina:
> Hi all
> I have to develop an embedded database using memory FLASH and memory
> RAM
> Some tables must be saved in RAM and some tables in FLASH ( RAM and
> FLASH are two different mounted directories in the file system).
> I saw it's possible to save different databases in different
> directories with CREATE DATABASE options.
>
> It's possible to save only some tables in different directories??

With 8.0 its possible. With pre 8.0 it would involve manual work
(linking) and you are restricted when you recreate tables and indices.

> If I want to work with two different databases, it's possible to do  a
> single transaction on two different databases ??

No. You might be able to simulate it with dblink, but generally no.

Regards
Tino