Search Postgresql Archives

Re: different behaviour between select and delete when constraint_exclusion = partition

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

 



Marc Cousin <cousinmarc@xxxxxxxxx> writes:
> Anyway here is the problem : when using constraint_exclusion=partition, a 
> delete query scans all partitions, when the same query rewritten as a select 
> is removing partitions as expected. When constraint_exclusion=on, the 
> partition removal works as expected with the delete too. I've tested it on 8.4 
> and 9.0

Hmm, this seems like a shortcoming in the constraint_exclusion=partition
feature.  The reason it doesn't work is that inheritance expansion of a
DELETE/UPDATE target rel is handled entirely differently from expansion
of a SELECT source. But it seems like it would be desirable if it did
work.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[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