Re: Plpsql connecting to more than one database?

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Plpsql connecting to more than one database?
Date: 2016-03-30 21:44:01
Message-ID: 56FC48A1.8020403@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/30/2016 2:02 PM, Francisco Reyes wrote:
> Have users that are familiar with plpsql and have a process which
> needs to be done withing transactions in 2 databases.
> begin in db1
> begin in db2
>
> work on 1
> work on 2
>
> if work on both dbs worked
>
> commit db1
> commit db2

and what if commit db2 fails for any number of reasons? you've already
committed db1, so you can't roll it back. this sort of work
requires '2pc' (2-phase commit), which is rather gnarly to implement.

--
john r pierce, recycling bits in santa cruz

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Reyes 2016-03-30 21:52:28 Re: Plpsql connecting to more than one database?
Previous Message Melvin Davidson 2016-03-30 21:22:27 Re: Plpsql connecting to more than one database?