Search Postgresql Archives

Re: Lock acquisition for partition table when setting generic plan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"yotsunaga.naoki@xxxxxxxxxxx" <yotsunaga.naoki@xxxxxxxxxxx> writes:
> I did the following.
> Even though I accessed one partition table(test2 table), I also acquired locks on other partition tables(test1 table).
> I expected to acquire locks on the parent table(test table) and the partition table to access(test2 table).
> Why does this happen?

You specified a generic plan:

> postgres=# set plan_cache_mode = force_generic_plan ;

so you are not going to get any plan-time optimization based on knowing
the id parameter.  Therefore the plan must include sub-plan nodes for
every child table, so executing it requires locking all those tables
to make sure their schemas haven't changed.

			regards, tom lane






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux