From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | johnsw(at)wardbrook(dot)com |
Cc: | Oleg Lebedev <oleg(dot)lebedev(at)waterford(dot)org>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: dblink: rollback transaction |
Date: | 2004-02-05 17:27:37 |
Message-ID: | 40227D09.6060305@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | David Garamond | 2004-02-05 17:29:07 | functional index "real world" uses |
Previous Message | David Garamond | 2004-02-05 17:27:18 | functional index "real world" uses |