Re: why do we need two snapshots per query?

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2011-11-11T15:01:34Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix copyright notices, other minor editing in new range-types code.

  2. Redesign the plancache mechanism for more flexibility and efficiency.

Robert Haas <robertmhaas@gmail.com> writes:
> Can't we arrange to retain the snapshot used for parse
> analysis / planning and reuse it for the portal that we create just
> afterwards?

Possibly, but what if planning takes a long time?  Also, I think you're
ignoring the extended-query-protocol scenario, where it would be a whole
lot harder to justify keeping a snapshot from Parse through Bind and
Execute.

			regards, tom lane