Re: dblink: rollback transaction

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: dblink: rollback transaction
Дата
Msg-id 40227D09.6060305@joeconway.com
обсуждение исходный текст
Ответ на Re: dblink: rollback transaction  ("John Sidney-Woollett" <johnsw@wardbrook.com>)
Список pgsql-general
John Sidney-Woollett wrote:
>
> I think PG badly needs nested transaction support... ;)

I think that is a main take-away here. You should not try to depend on
dblink as a robust replication solution. Perhaps if postgres had
two-phase commit and nested transactions, but not at the moment.

That said, depending on how you are implementing the loop in your
pseudo-code, you might be able to get closer by using persistent dblink
connections, and starting a transaction on the remote side before
starting the local transaction and running your plpgsql function (or
whatever it is you're running). If the local transaction fails, send an
ABORT to the remote side before closing the connection. However I can't
offhand think of a way to do that in an automated fashion.

Joe


В списке pgsql-general по дате отправления:

Предыдущее
От: Carlos Ojea Castro
Дата:
Сообщение: Re: Proper tool to display graphics?
Следующее
От: "John Sidney-Woollett"
Дата:
Сообщение: Re: performance difference: multiple db vs single db