truncate partitioned table locking

From: "Sriram Dandapani" <sdandapani(at)counterpane(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: truncate partitioned table locking
Date: 2006-06-19 17:11:49
Message-ID: 6992E470F12A444BB787B5C937B9D4DF04C4CDCB@ca-mail1.cis.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi

I have master table A, inherited by Table B and Table C

Table B has data for June 18

Table C has data for June 19

The application issues queries against the master table...on June 19,
there is no reference to data from June 18 tables.

When I issue a truncate table B, it appears to take a lock on master
table A (this is evident as other inserts to the table are in a WAITING
state), and the ps listing shows the truncate table in a WAIT state
(along with the INSERTS)

Does the truncation of a child table take a lock on the master table ?
and if so, why does it go in a WAIT state

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2006-06-19 18:26:30 Re: truncate partitioned table locking
Previous Message TK 2006-06-19 11:27:11 "UNICODE" error during restoration