diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-09-25 17:33:32 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-09-25 17:34:20 -0400 |
commit | d5aa7a9fe68b2017362421bd853faeb8199a472c (patch) | |
tree | 5c63477d104b2977d3ee4757bd10511c95151291 /src/backend/access/gist/gistget.c | |
parent | 2594ad74360c647edfd0645c4097d78ff83b4c3b (diff) | |
download | postgresql-d5aa7a9fe68b2017362421bd853faeb8199a472c.tar.gz postgresql-d5aa7a9fe68b2017362421bd853faeb8199a472c.zip |
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.
Diffstat (limited to 'src/backend/access/gist/gistget.c')
0 files changed, 0 insertions, 0 deletions