Re: Questions about Rollback - after insert, update,

From: Yonatan Ben-Nes <da(at)canaan(dot)co(dot)il>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: Emi Lu <emilu(at)cs(dot)concordia(dot)ca>, pgsql-general(at)postgresql(dot)org
Subject: Re: Questions about Rollback - after insert, update,
Date: 2005-09-23 11:19:34
Message-ID: 4333E4C6.4090307@canaan.co.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bruno Wolff III wrote:
> On Thu, Sep 22, 2005 at 15:20:17 -0400,
> Emi Lu <emilu(at)cs(dot)concordia(dot)ca> wrote:
>
>>greetings,
>>
>>I remembered I read something in the mailing list about "*rollback*" a
>>while ago. People mentioned that some operations cannot rollback.
>>I cannot remember what kinds of perations are not be able to rollback?
>
>
> I actually have the message saved for reference, so it is easier attach it
> rather than try to figure out how to link to it in the archives.
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: [GENERAL] Table modifications with dependent views - best
> From:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> Date:
> Fri, 22 Apr 2005 11:36:43 -0400
> To:
> Bruno Wolff III <bruno(at)wolff(dot)to>
>
> To:
> Bruno Wolff III <bruno(at)wolff(dot)to>
> CC:
> David Roussel <pgsql-general(at)diroussel(dot)xsmail(dot)com>, Michael Fuhr
> <mike(at)fuhr(dot)org>, John Browne <jkbrowne(at)gmail(dot)com>,
> pgsql-general(at)postgresql(dot)org
>
>
> Bruno Wolff III <bruno(at)wolff(dot)to> writes:
>
>>I wasn't able to find where this is spelled out in the documentation,
>>but I believe all DDL commands except DROP DATABASE can be rolled back now.
>
>
> I don't think there's any all-in-one-place statement about it, but
> anything that doesn't explicitly object to being put inside a
> transaction block can be rolled back. Grepping for
> PreventTransactionChain, I see that the current suspects are
>
> CLUSTER (only the multi-table variants)
> CREATE DATABASE
> DROP DATABASE
> REINDEX DATABASE
> CREATE TABLESPACE
> DROP TABLESPACE
> VACUUM
>
> regards, tom lane
>
>
> ------------------------------------------------------------------------
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org

You can add to that list the command TRUNCATE though it can be rollback
its not useful in cases where the truncated data should continue to be
accessed till the transaction be commited.

By the way I posted at the manual a comment about it (at the TRUNCATE
page) but it wasnt autorized, anyone know why? maybe im mistaken? maybe
its a bug and it should work?

Cheers,
Yonatan Ben-Nes

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message ruben 2005-09-23 11:34:18 SQL command to dump the contents of table failed: PQendcopy() failed. Error message from server: socket not open
Previous Message Yonatan Ben-Nes 2005-09-23 11:11:25 Re: Slow search.. quite clueless