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

Re: Weird locking situation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Weird locking situation
Date: 2003-10-03 13:39:30
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> OK, I tried it again and it still seems buggy to me...

> I wonder if it's something to do with the tsearch trigger on food_foods?

I tried a table with a simple BEFORE trigger and it didn't fail.
But when I added a GIST index, it did:

[ install contrib/btree_gist ]
regression=# create index gindex on foo using gist (f2);
regression=# UPDATE foo SET f2=now() WHERE f1=1;
ERROR:  deadlock detected
DETAIL:  Process 18122 waits for AccessExclusiveLock on relation 154635 of database 17139; blocked by process 18133.
Process 18133 waits for ShareLock on transaction 6330; blocked by process 18122.

The trouble here is that GIST indexes are not concurrency-safe.
This is on the TODO list but I fear it's not a small task ...

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Michael BrusserDate: 2003-10-03 13:40:50
Subject: Using backslash in query
Previous:From: achillDate: 2003-10-03 12:56:07
Subject: HeapTuple->t_tableOid==0 after SPI_exec

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