truncate partitioned table locking - Mailing list pgsql-admin

From Sriram Dandapani
Subject truncate partitioned table locking
Date
Msg-id 6992E470F12A444BB787B5C937B9D4DF04C4CDCB@ca-mail1.cis.local
Whole thread Raw
Responses Re: truncate partitioned table locking  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-admin by date:

Previous
From: TK
Date:
Subject: "UNICODE" error during restoration
Next
From: Tom Lane
Date:
Subject: Re: truncate partitioned table locking