Re: Allowing join removals for more join types

Поиск
Список
Период
Сортировка
От Noah Misch
Тема Re: Allowing join removals for more join types
Дата
Msg-id 20140603235053.GA351732@tornado.leadboat.com
обсуждение исходный текст
Ответ на Re: Allowing join removals for more join types  (David Rowley <dgrowleyml@gmail.com>)
Ответы Re: Allowing join removals for more join types
Re: Allowing join removals for more join types
Список pgsql-hackers
On Wed, May 28, 2014 at 08:39:32PM +1200, David Rowley wrote:
> The attached patch allows join removals for both sub queries with left
> joins and also semi joins where a foreign key can prove the existence of
> the record.

When a snapshot can see modifications that queued referential integrity
triggers for some FK constraint, that constraint is not guaranteed to hold
within the snapshot until those triggers have fired.  For example, a query
running within a VOLATILE function f() in a statement like "UPDATE t SET c =
f(c)" may read data that contradicts FK constraints involving table "t".
Deferred UNIQUE constraints, which we also do not yet use for deductions in
the planner, have the same problem; see commit 0f39d50.  This project will
need a design accounting for that hazard.

As a point of procedure, I recommend separating the semijoin support into its
own patch.  Your patch is already not small; delaying non-essential parts will
make the essential parts more accessible to reviewers.

Thanks,
nm

-- 
Noah Misch
EnterpriseDB                                 http://www.enterprisedb.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: idle_in_transaction_timeout
Следующее
От: Vik Fearing
Дата:
Сообщение: Re: idle_in_transaction_timeout