Re: [GENERAL] Lock issues with partitioned table

2010-06-03 Thread Jehan-Guillaume (ioguix) de Rorthais
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/06/2010 16:00, Tom Lane wrote: > "Jehan-Guillaume (ioguix) de Rorthais" writes: >> Shouldn't locks only be on tables/indexes that are actually used by the >> planner ? > > Well, yeah, they are. The planner must take at least AccessShareLock >

Re: [GENERAL] Lock issues with partitioned table

2010-06-03 Thread Tom Lane
"Jehan-Guillaume (ioguix) de Rorthais" writes: > Shouldn't locks only be on tables/indexes that are actually used by the > planner ? Well, yeah, they are. The planner must take at least AccessShareLock on any relation referenced by the query. It might later be able to prove that the relation ne

[GENERAL] Lock issues with partitioned table

2010-06-03 Thread Jehan-Guillaume (ioguix) de Rorthais
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have some trouble understanding the locking policy with partitioned tables. Here is a simple schema based on a real one: CREATE DATABASE test; \c test CREATE TABLE test( id integer PRIMARY KEY, id_dummy integer, id_part1 integer