Re: Making a result of transaction visible to everyone, saving the ability for a rollback

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Making a result of transaction visible to everyone, saving the ability for a rollback
Date: 2009-02-12 12:11:28
Message-ID: 20090212121128.GM3008@frubble.xen.chris-lamb.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Feb 11, 2009 at 12:58:53PM +0300, Igor Katson wrote:
> I want to make the result of a transaction, in which this function is
> executed, visible to the outer clients, but to have the ability of
> making a rollback in case one of the clients says something went wrong.
> Is it possible to do that?

You can't use ROLLBACK to accomplish that; transactional semantics are
an all or nothing affair. For example, if another transaction writes
results from this intermediate transaction back into the database how
does the database know what you really want to get rid of when you
rollback.

A possible solution would be to perform a backup or use point in
time recovery to be able to get the whole database back to the state
beforehand.

Sam

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gurjeet Singh 2009-02-12 12:13:33 Need help in porting Oracle PL/SQL's OUT paramater based procedures
Previous Message Abdul Rahman 2009-02-12 10:14:40 Re: Multiple postgres.exe On Processes