Re: Weird behavior with "sensitive" cursors.

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Daniel F <dbf13db(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Weird behavior with "sensitive" cursors.
Date: 2009-10-01 16:27:01
Message-ID: 20091001162701.GE5607@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane escribió:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > Tom Lane escribió:
> >> Well, the first problem is that 8.4 is failing to duplicate the
> >> historical behavior.
>
> > Oh! That's easy.
>
> I don't think that testing rowMarks is the right thing at all here.
> That tells you whether it's a SELECT FOR UPDATE, but actually we
> want any cursor (and only cursors) to have a private snapshot.

Hmm, okay.

> Also, do we really need the Register bit? Won't the portal register
> its use of the snapshot anyway (or if it doesn't, isn't that a bug)?

Perhaps, but registering it a second time does not harm, and I think
it's cleaner to expose the new RegisterCopiedSnapshot function than
bare CopySnapshot.

In PortalStart there's something I'd like to clean up in HEAD, which is
that we're setting up the snapshot as Active only to be able to do
GetActive to pass it down to CreateQueryDesc. That's silly -- we should
just get a local snap to pass down; no need to push, get, pop.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2009-10-01 16:40:57 Re: I can not drop a user/role because an object depent on it.
Previous Message Paul Gaspar 2009-10-01 15:46:59 Re: Collation in ORDER BY not lexicographical