Re: Rollback of Query Cancellation

From: Abdul Rahman <abr_ora(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, Sim Zacks <sim(at)compulab(dot)co(dot)il>
Subject: Re: Rollback of Query Cancellation
Date: 2009-01-28 07:58:12
Message-ID: 115273.52789.qm@web65701.mail.ac4.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Well Jaime,

I executed all the delete queries one by one. Now I am unable to understand that why it took sufficient time to run the last query before cancellation.

i.e. delete from ci_cif_v where req_id='0824100207';

This morning it performed the delete operation and deleted certain number of rows within few seconds. Then what it was doing yesterday. Here it seems that it was performing something else (as guessed by Sim Zacks) before the execution of delete query. And when I canceled, the query was not executed till that time. Then why it didn't take sufficient amount of time to perform something else before the execution of same query today.

________________________________
From: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
To: Abdul Rahman <abr_ora(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Sent: Wednesday, January 28, 2009 12:20:41 PM
Subject: Re: Rollback of Query Cancellation

On Wed, Jan 28, 2009 at 2:10 AM, Abdul Rahman <abr_ora(at)yahoo(dot)com> wrote:
> Thanks Jaime,
> Plz consider the actual log files to explore the issue in detail. Because I
> have pasted the log files of client machine, I am using (sorry).
>
>
> 2009-01-27 18:29:25 STATEMENT: delete from ci_cin_type_v where
> req_id='0824100207'
> delete from ci_cust_type_v where req_id='0824100207'
> delete from ci_dependents_v where req_id='0824100207'
> delete from ci_employer_v where req_id='0824100207'
> delete from ci_cor_sig_v where req_id='0824100207'
> delete from ci_corporate_v where req_id='0824100207'
> delete from ci_individual_v where req_id='0824100207'
> delete from ci_cif_v where req_id='0824100207'

then you have a lot of deletes, are there executing inside a
transaction? are you calling a trigger?

> 2009-01-27 18:29:41 ERROR: relation "ci_cust_type_v" does not exist

this table does not exist

> 2009-01-27 18:29:41 STATEMENT: delete from ci_cust_type_v where
> req_id='0824100207'
> 2009-01-27 18:52:08 LOG: could not receive data from client: No connection
> could be made because the target machine actively refused it.
> 2009-01-27 18:52:08 LOG: unexpected EOF on client connection
> 2009-01-27 18:52:08 LOG: could not receive data from client: No connection
> could be made because the target machine actively refused it.
> 2009-01-27 18:52:08 LOG: unexpected EOF on client connection
>

guess this messages are received after the CANCEL QUERY

if the series of deletes are all executed inside a transaction then
they all were rollback if not only the last one (the one that
generates the error) was rolledback

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Philippe Lang 2009-01-28 08:43:23 Killing an offending process without restarting Postgresql safe?
Previous Message Sim Zacks 2009-01-28 07:53:00 Re: Rollback of Query Cancellation