Re: Are partitions getting pruned? - Mailing list pgsql-general

From Jeff Janes
Subject Re: Are partitions getting pruned?
Date
Msg-id CAMkU=1w4KnC1eotHPAjmYi0U0cpx3BMBO=ELOT+Vjzdspq1R_g@mail.gmail.com
Whole thread Raw
In response to Are partitions getting pruned?  (Robert Klaus <robert.klaus.07@gmail.com>)
List pgsql-general
On Mon, Apr 8, 2013 at 11:11 AM, Robert Klaus <robert.klaus.07@gmail.com> wrote:

Postgres 8.4.9  on CentOS

 

I partitioned some tables over the weekend by month using a date field as the partitioning column.  Table inheritance was used and all indexes on the parent were created on the partitions.  constraint_exclustion = partition.

 

My question is, are partitions really getting pruned or are locks showing up just due to inheritance.


In order to know that a partition can be pruned, you have to know what the check constraint on it is.  In order to know that, you have to lock the table so that the constraint can't change while you look at it.  So you could say that it is just due to inheritance.

Cheers,

Jeff

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: procedure to contribute this community
Next
From: David Kerr
Date:
Subject: AWS and postgres issues