pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: Mark Slagell <ms@iastate.edu>
To: Dave Page <dpage@vale-housing.co.uk>
To: pgsql-odbc@postgresql.org
Subject: Re: psqlodbc versioning
Date: Thu, 8 Jul 2004 20:08:50 +0200
Message-ID: <200407082008.50561.peter_e@gmx.net> (raw)
In-Reply-To: <40ED6FD6.4010903@iastate.edu>
References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E40C38D9@ratbert.vale-housing.co.uk>
	<40ED6FD6.4010903@iastate.edu>

Mark Slagell wrote:
> Being unable to improve the application ourselves since we don't own
> it, and assuming we're not just getting a snow job about what odbc
> supports, I'd be pleased if we could promote adding lock reporting to
> the psql odbc interface -- even if that means expanding the spec a
> little to duplicate that part of Oracle's behavior which our vendor
> apparently relies on. (Or does that imply postgres-proper issues too,
> making the idea unworkable?)

Could you show us some kind of specification about what this new lock 
reporting interface would look like (what functions, what parameters, 
etc.)?

It is possible to look at the current set of locks, and in 7.5 there 
will even be a LOCK NOWAIT option that allows you to try a lock and 
return a failure without waiting if the lock can't be acquired.  These 
are only table locks.  To acquire row-level locks, you use SELECT FOR 
UPDATE before you actually write to the table, also with the new NOWAIT 
option.

But the whole concept of locks is sort of obsolete since PostgreSQL uses 
multiversion concurrency control which does not require locks (loosely 
speaking).  Moreover, long-running transactions (which would be 
required to hold locks for a long time) are very problematic and should 
be avoided at all costs.  What you need is a user-space cooperative 
locking system.  There is a bit of that in contrib/userlock, but making 
that work, plus making that work with the ODBC driver and in a way that 
you application can swallow could be a large project.




view thread (6+ messages)  latest in thread

Message-ID: <200407082008.50561.peter_e@gmx.net>
Permalink:  ../200407082008.50561.peter_e@gmx.net/
Also on:    postgresql.org/message-id/200407082008.50561.peter_e@gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: peter_e@gmx.net, ms@iastate.edu, dpage@vale-housing.co.uk
  Subject: Re: psqlodbc versioning
  In-Reply-To: <200407082008.50561.peter_e@gmx.net>
  References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E40C38D9@ratbert.vale-housing.co.uk> <40ED6FD6.4010903@iastate.edu> <200407082008.50561.peter_e@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox