Обсуждение: could you tell me this..?

Поиск
Список
Период
Сортировка

could you tell me this..?

От
백승엽
Дата:
Hi.
 
 
I am korean database engineer.
 
my english skill is very poor.
 
but i desire that you teach this situation.
 
 
um...
 
I am testing postgresql performance  in these days;
 
today, I found this situation.
 
 
 
Session 1. -
 
begin;
delete from XXXX;
 
 
Session 2 -
 
delete from XXXX;
 
 
thus, it occured row level locking.
 
 
 
 
so. i killed Session 1's PID with kill -9 commands
 
 
but. both session are crashed.
 
 
is this normal ? or bug?
 
 
could you tell me this situation whether normal or bug?
 
please teach me about this.
 
 
have a nice day.
 
thank you for your help.
 
 
 
From Seung yup.
 

Re: could you tell me this..?

От
Szymon Guz
Дата:


2010/8/5 백승엽 <sybaek@seriends.com>
Hi.
 
 
I am korean database engineer.
 
my english skill is very poor.
 
but i desire that you teach this situation.
 
 
um...
 
I am testing postgresql performance  in these days;
 
today, I found this situation.
 
 
 
Session 1. -
 
begin;
delete from XXXX;
 
 
Session 2 -
 
delete from XXXX;
 
 
thus, it occured row level locking.
 
 
 
 
so. i killed Session 1's PID with kill -9 commands
 
 

killing it with -9 crashed the whole PostgreSQL server, don't do that. Instead just login to the database and run the function pg_cancel_backend() http://www.postgresql.org/docs/8.4/static/functions-admin.html, much more safe way.

regards
Szymon

Re: could you tell me this..?

От
Ketema Harris
Дата:
Never kill -9. Use kill -INT, whatever signal num that is, 11?

 Sent from my iPhone

On Aug 5, 2010, at 3:14 AM, 백승엽 <sybaek@seriends.com> wrote:

> Hi.
>
>
> I am korean database engineer.
>
> my english skill is very poor.
>
> but i desire that you teach this situation.
>
>
> um...
>
> I am testing postgresql performance  in these days;
>
> today, I found this situation.
>
>
>
> Session 1. -
>
> begin;
> delete from XXXX;
>
>
> Session 2 -
>
> delete from XXXX;
>
>
> thus, it occured row level locking.
>
>
>
>
> so. i killed Session 1's PID with kill -9 commands
>
>
> but. both session are crashed.
>
>
> is this normal ? or bug?
>
>
> could you tell me this situation whether normal or bug?
>
> please teach me about this.
>
>
> have a nice day.
>
> thank you for your help.
>
>
>
> From Seung yup.
>

Re: could you tell me this..?

От
"A. Kretschmer"
Дата:
In response to ?????? :
> today, I found this situation.
>  
>  
>  
> Session 1. -
>  
> begin;
> delete from XXXX;
>  
>  
> Session 2 -
>  
> delete from XXXX;
>  
>  
> thus, it occured row level locking.
>  
>  
>  
>  
> so. i killed Session 1's PID with kill -9 commands
>  
>  
> but. both session are crashed.
>  
>  
> is this normal ? or bug?

Can't reproduce that.

Until the kill, session 2 waits, after the kill session 2 finished the
delete-command. Without problems, expected behavior.


Regards, Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431  2EB0 389D 1DC2 3172 0C99

Re: could you tell me this..?

От
"A. Kretschmer"
Дата:
In response to ?????? :
> so. i killed Session 1's PID with kill -9 commands

What have you killed, the client or the postmaster?

Regards, Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431  2EB0 389D 1DC2 3172 0C99

Re: could you tell me this..?

От
Vick Khera
Дата:
On Thu, Aug 5, 2010 at 9:40 AM, Szymon Guz <mabewlun@gmail.com> wrote:
> killing it with -9 crashed the whole PostgreSQL server, don't do that.
> Instead just login to the database and run the function
> pg_cancel_backend() http://www.postgresql.org/docs/8.4/static/functions-admin.html,
> much more safe way.

Or, assuming you're still in the shell typing those commands, just hit
ctrl-c to cancel the current query.

Re: could you tell me this..?

От
Lew
Дата:
Please do not top-post.

On 08/05/2010 09:42 AM, Ketema Harris wrote:
> Never kill -9. Use kill -INT, whatever signal num that is, 11?

"man kill"
INT        2
SEGV      11

--
Lew