pgsql: Avoid unnecessary snapshot-acquisitions in BuildCachedPlan.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Avoid unnecessary snapshot-acquisitions in BuildCachedPlan.
Дата
Msg-id E1R7wLH-0000sf-Ay@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Avoid unnecessary snapshot-acquisitions in BuildCachedPlan.

I had copied-and-pasted a claim that we couldn't reach this point when
dealing with utility statements, but that was a leftover from when the
caller was required to supply a plan to start with.  We now will go
through here at least once when handling a utility statement, so it
seems worth a check to see whether a snapshot is actually needed.
(Note that analyze_requires_snapshot is quite a cheap test.)

Per suggestion from Yamamoto Takashi.  I don't think I believe that this
resolves his reported assertion failure; but it's worth changing anyway,
just to save a cycle or two.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d5aa7a9fe68b2017362421bd853faeb8199a472c

Modified Files
--------------
src/backend/utils/cache/plancache.c |   11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: pgsql: In pgrminclude, document requirement to use pgcompinclude, and s
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fully const-ify PQconnectdbParams, PQconnectStartParams, and PQp