Re: why do we need two snapshots per query?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Cc: Florian Pflug <fgp(at)phlo(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: why do we need two snapshots per query?
Date: 2011-12-13 20:30:07
Message-ID: CA+TgmoYpRvPoKw_WffUQCjugU+a_g7GVPaLSBxUb9xyMTxmVyQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Nov 26, 2011 at 2:50 PM, Dimitri Fontaine
<dimitri(at)2ndquadrant(dot)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

Attachment Content-Type Size
fewer-snapshots.patch application/octet-stream 6.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2011-12-13 20:33:28 Re: JSON for PG 9.2
Previous Message Peter Eisentraut 2011-12-13 20:27:03 Re: JSON for PG 9.2