Re: cursor sensitivity misunderstanding - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: cursor sensitivity misunderstanding
Date
Msg-id af957f28-1c41-2470-3294-a19dd6e852f8@enterprisedb.com
Whole thread Raw
In response to Re: cursor sensitivity misunderstanding  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
On 18.02.21 17:11, David G. Johnston wrote:
> The OP was doing a course based on Oracle and was confused regarding our 
> behavior.  The documentation failed to help me provide a useful 
> response, so I'd agree there is something here that needs reworking if 
> not outright fixing.

According to the piece of the standard that I posted, the sensitivity 
behavior here is implementation-dependent (not even -defined), so both 
implementations are correct.

But the poster was apparently also confused by the same piece of 
documentation.

If you consider the implementation of MVCC in PostgreSQL, then the 
current behavior makes sense.  I suspect that this consideration was 
much more interesting for older system with locking-based concurrency 
and where "read uncommitted" was a real thing.  With the current system, 
insensitive cursors are essentially free and sensitive cursors would 
require quite a bit of effort to implement.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Some regular-expression performance hacking
Next
From: Tom Lane
Date:
Subject: Re: Some regular-expression performance hacking