Re: TRUNCATE locking problem - Mailing list pgsql-general

From Tom Lane
Subject Re: TRUNCATE locking problem
Date
Msg-id 3032.1121696556@sss.pgh.pa.us
Whole thread Raw
In response to TRUNCATE locking problem  (Joe Maldonado <jmaldonado@webehosting.biz>)
Responses Re: TRUNCATE locking problem
List pgsql-general
Joe Maldonado <jmaldonado@webehosting.biz> writes:
> It seems that TRUNCATE is first posting a lock on the table and then
> waiting for other transactions to finish before truncating the table
> thus blocking all other operations.

That's what it's supposed to do.  If you have a problem with the length
of the delay, find the (other) transaction that's accessing the table
for too long and fix that.

            regards, tom lane

pgsql-general by date:

Previous
From: Stephen Frost
Date:
Subject: Re: TRUNCATE locking problem
Next
From: Stephan Szabo
Date:
Subject: Re: Changes to not deferred FK in 8.0.3 to 7.4?