Re: Rollback of Query Cancellation - Mailing list pgsql-general

From Jaime Casanova
Subject Re: Rollback of Query Cancellation
Date
Msg-id 3073cc9b0901272156x60d7deds47d685993823adec@mail.gmail.com
Whole thread Raw
In response to Rollback of Query Cancellation  (Abdul Rahman <abr_ora@yahoo.com>)
List pgsql-general
On Wed, Jan 28, 2009 at 12:19 AM, Abdul Rahman <abr_ora@yahoo.com> wrote:
> Dear All,
>
> PostgreSQL does not perform rollback action. Is it true?
>

no. postgresql executes all statements that are outside an explicit
transaction in its own implicit one [1] executing commit at the end,
if you cancelled the query the commit never executed and the records
were never deleted...

even more to the point, postgres never delete tuples on delete just
mark them as invalid since transaction number X. at commit time the
transaction is marked as correctly finished and all changes are WAL
logged then suddenly changes take effect... rollback never mark the
transaction as finished and doesn't save WAL records (that meaning
that changes never spread to the datafiles)

actually ROLLBACK is very cheap just don't save changes, COMMIT makes
all the work...

now, your post make me think that you think the ROLLBACK never
executed based on... reponse time? very unscientific (there are plenty
other reasons for that to happen)

[1] http://www.postgresql.org/docs/8.3/static/tutorial-transactions.html

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157

pgsql-general by date:

Previous
From: Abdul Rahman
Date:
Subject: Re: Rollback of Query Cancellation
Next
From: Jaime Casanova
Date:
Subject: Re: Rollback of Query Cancellation