Re: truncate partitioned table locking - Mailing list pgsql-admin

From Aaron Bono
Subject Re: truncate partitioned table locking
Date
Msg-id bf05e51c0606191302h25a967denf90d232f83ccc30f@mail.gmail.com
Whole thread Raw
In response to Re: truncate partitioned table locking  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
I am curious, why would a query on a parent table, A, put a lock on a child table, B?  If the query doesn't touch B or any of its children, why would PostgreSQL care what happens to the child table during its query?

-Aaron

On 6/19/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Sriram Dandapani" <sdandapani@counterpane.com> writes:
> I have master table A, inherited by Table B and Table C

> Does the truncation of a child table take a lock on the master table ?

No, but it certainly locks the child table ... and queries on A are
going to try to scan all three tables.

                        regards, tom lane

pgsql-admin by date:

Previous
From: "Sriram Dandapani"
Date:
Subject: Re: truncate partitioned table locking
Next
From: Tom Lane
Date:
Subject: Re: truncate partitioned table locking