Re: Default Access Exclusive Lock on Update? - Mailing list pgsql-general

From Christopher Browne
Subject Re: Default Access Exclusive Lock on Update?
Date
Msg-id 873bi0qmqu.fsf@wolfe.cbbrowne.com
Whole thread Raw
In response to Default Access Exclusive Lock on Update?  (seth.m.green@gmail.com)
List pgsql-general
Centuries ago, Nostradamus foresaw when seth.m.green@gmail.com would write:
> For anyone that is interested, my problem was solved on another list.
> Turns out the TRUNCATE command that I run at the beginning of the SP
> creates and holds an access exclusive lock on the table for the entire
> duration of the SP.  I changed it to DELETE FROM and my problem was
> fixed.

I was thinking of mentioning it; didn't think to...

By the way, if you're taking the approach of emptying the table out
entirely this way, you'll want to either:

 a) Vacuum the table each time, or
 b) Make sure you do use TRUNCATE once in a while

Otherwise the number of dead tuples will grow ungraciously, and you'll
find efficiency drops :-(.
--
wm(X,Y):-write(X),write('@'),write(Y). wm('cbbrowne','gmail.com').
http://linuxdatabases.info/info/slony.html
Inclusion of very old messages from others makes for an impressive show.
-- from the Symbolics Guidelines for Sending Mail

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: ERROR: column "datpath" does not exist
Next
From: Bruce Momjian
Date:
Subject: Re: Negative offsets