Re: TRUNCATE locking problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Maldonado <jmaldonado(at)webehosting(dot)biz>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: TRUNCATE locking problem
Date: 2005-07-18 14:22:36
Message-ID: 3032.1121696556@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joe Maldonado <jmaldonado(at)webehosting(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2005-07-18 14:28:38 Re: Changes to not deferred FK in 8.0.3 to 7.4?
Previous Message Stephen Frost 2005-07-18 14:15:21 Re: TRUNCATE locking problem