Re: Rollback of Query Cancellation

Поиск
Список
Период
Сортировка
От Jaime Casanova
Тема Re: Rollback of Query Cancellation
Дата
Msg-id 3073cc9b0901272156x60d7deds47d685993823adec@mail.gmail.com
обсуждение исходный текст
Ответ на Rollback of Query Cancellation  (Abdul Rahman <abr_ora@yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От: Abdul Rahman
Дата:
Сообщение: Re: Rollback of Query Cancellation
Следующее
От: Jaime Casanova
Дата:
Сообщение: Re: Rollback of Query Cancellation