Re: why do we need two snapshots per query?

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Dimitri Fontaine <dimitri@2ndquadrant.fr>
Cc: Florian Pflug <fgp@phlo.org>, Tom Lane <tgl@sss.pgh.pa.us>, Simon Riggs <simon@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2011-12-13T20:30:07Z
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.

Attachments

On Sat, Nov 26, 2011 at 2:50 PM, Dimitri Fontaine
<dimitri@2ndquadrant.fr> wrote:
>> +     /* Done with the snapshot used for parameter I/O and parsing/planning */
>> +     if (snapshot_set)
>> +             PopActiveSnapshot();
>
> This comment needs adjusting.

I thought about adjusting it, but I didn't see what it made sense to
adjust it to.  It still is the parameter used for parameter I/O and
parsing/planning, so the existing text isn't wrong.  It will possibly
also get reused for execution, but the previous statement has a
lengthy comment on that, so it didn't seem worth recapitulating here.

> You need to be editing the comments for this function.  To be specific
> you didn't update this text:
>
>  * The caller can optionally pass a snapshot to be used; pass InvalidSnapshot
>  * for the normal behavior of setting a new snapshot.  This parameter is
>  * presently ignored for non-PORTAL_ONE_SELECT portals (it's only intended
>  * to be used for cursors).

Actually, I did, but the change was in the second patch file attached
to the same email, which maybe you missed?  Combined patch attached.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company