Skip site navigation (1) Skip section navigation (2)

RE: Questionable coding in proc.c & lock.c

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: Questionable coding in proc.c & lock.c
Date: 2000-07-28 08:03:47
Message-ID: 000301bff86a$5bbd07c0$2801007e@tpf.co.jp (view raw or flat)
Thread:
Lists: pgsql-hackers
> -----Original Message-----
> From: pgsql-hackers-owner(at)hub(dot)org [mailto:pgsql-hackers-owner(at)hub(dot)org]On
> Behalf Of Tom Lane
> 
> I spent some time looking around for possible causes of the recently
> reported deadlock conditions.  I couldn't find any smoking gun, but
> I found a couple of things that look fishy:
> 

Oops,I've forgotten another freezing issue reported by Alfred Perlstein.
We know the cause(db access in abort transaction state) of it.
Seems xact.c has been pretty changed after I examined it 2 months
ago. Have you already fixed it ? If not,I would examine it again and
fix the bug. OK ?

Here's a reproducible example.

Session-1
	# begin;
	BEGIN
	=# lock t;
	LOCK TABLE

Session-2
	=# begin;
	BEGIN
	=# lock t; 
	[blocked] ^C
	Cancel request sent
	ERROR:  Query cancel requested while waiting lock
	reindex=# select * from t;
	[blocked]

Session-1
	=# commit;
	COMMIT

Session-2
	ERROR:  LockRelation: LockAcquire failed
	=# abort;
	ROLLBACK
	=# lock t;
	[blocked]

Regards.

Hiroshi Inoue 

In response to

Responses

pgsql-hackers by date

Next:From: Denis PerchineDate: 2000-07-28 09:55:23
Subject: Fwd: Postgres update
Previous:From: Hiroshi InoueDate: 2000-07-28 05:50:51
Subject: RE: Questionable coding in proc.c & lock.c

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group