Re: ACCESS EXCLUSIVE LOCK - Mailing list pgsql-hackers

From seth.m.green@gmail.com
Subject Re: ACCESS EXCLUSIVE LOCK
Date
Msg-id 1141307710.506042.246170@t39g2000cwt.googlegroups.com
Whole thread Raw
In response to ACCESS EXCLUSIVE LOCK  (seth.m.green@gmail.com)
List pgsql-hackers
No.  Here is the offending SP:

CREATE OR REPLACE FUNCTION update_my_cache() RETURNS void AS '
BEGIN
 TRUNCATE TABLE my_cache_table; INSERT INTO my_cache_table SELECT * FROM
get_my_stuff_to_fill_cache_table();
 RETURN;

END
' LANGUAGE plpgsql;

I've checked the SP get_my_stuff_to_fill_cache_table() that is run from
within update_my_cache() and it does not cause locks. So it seems
something else about the update_my_cache() SP is causing this access
exclusive lock which prevents anything from even dirty reading the
table for the entire time it executes (roughly 10 seconds);



pgsql-hackers by date:

Previous
From: Mon Nsi
Date:
Subject: heaptuple over the network
Next
From: seth.m.green@gmail.com
Date:
Subject: Re: ACCESS EXCLUSIVE LOCK