Re: 2PC w/ dblink

From: Vick Khera <vivek(at)khera(dot)org>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: 2PC w/ dblink
Date: 2010-11-11 13:17:35
Message-ID: AANLkTimisubaP3x_Or7h7WyO7qnOvPkRQocuRo+SWDFX@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Nov 10, 2010 at 12:39 PM, John R Pierce <pierce(at)hogranch(dot)com> wrote:
> My developers are complaining about the lack of support for 2 phase commit
> in this scenario.    Can we get any mileage on PREPARE TRANSACTION in a
> dblink sort of environment like this?
>

Yes, that's an ideal case for this. We use it outside of dblink with
two direct connections to two databases. Just be sure you have some
monitoring that will alert you to prepared transactions that are
lingering for a long time. Also, if you have a pending prepared
transaction on a host with a newly inserted row, and you retry
inserting that row from another connection, you will get an immediate
"statement timeout" error. This is a bit confusing at first but once
you know what the cause is, it is easy to work with.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vick Khera 2010-11-11 13:21:54 Re: NOTIFY/LISTEN why is not a callback as notice processing.
Previous Message Guillaume Lelarge 2010-11-11 13:05:15 Re: ignore errors for COPY