Clodoaldo Pinto <[EMAIL PROTECTED]> writes:

> 2005/8/29, Tom Lane <[EMAIL PROTECTED]>:
> > 
> > What is the function doing to the table, exactly?  DDL changes generally
> > take exclusive locks ...
> 
> This is the transaction:
> 
> begin;
> select update_last_date();
> truncate times_producao;

I think truncate takes a table lock. 
Just change it to "delete from times_producao".

Also, if consider doing a "vacuum full" or "cluster" after the batch job to
clear up the free space (not in a large transaction). That will still take a
table lock but it may be a small enough downtime to be worth the speed
increase the rest of the day.

-- 
greg


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to