Re: why do we need two snapshots per query?
От | Tom Lane |
---|---|
Тема | Re: why do we need two snapshots per query? |
Дата | |
Msg-id | 6344.1321200592@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: why do we need two snapshots per query? (Simon Riggs <simon@2ndQuadrant.com>) |
Ответы |
Re: why do we need two snapshots per query?
Re: why do we need two snapshots per query? |
Список | pgsql-hackers |
Simon Riggs <simon@2ndQuadrant.com> writes: > If we could be certain that a query was being executed immediately ... that is, with the same snapshot ... > then it would be possible to simplify expressions using stable > functions as if they were constants. My earlier patch did exactly > that. Mph. I had forgotten about that aspect of it. I think that it's very largely superseded by Marti Raudsepp's pending patch: https://commitfest.postgresql.org/action/patch_view?id=649 which does more and doesn't require any assumption that plan and execution snapshots are the same. Now you're going to say that that doesn't help for failure to prove partial index or constraint conditions involving stable functions, and my answer is going to be that that isn't an interesting use-case. Partial index conditions *must* be immutable, and constraint conditions *should* be. As far as partitioning goes, the correct solution there is to move the partition selection to run-time, so we should not be contorting query semantics to make incremental performance improvements with the existing partitioning infrastructure. I remain of the opinion that Robert's proposal is a bad idea. regards, tom lane
В списке pgsql-hackers по дате отправления: