Re: psqlodbc versioning

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Mark Slagell <ms(at)iastate(dot)edu>, Dave Page <dpage(at)vale-housing(dot)co(dot)uk>, pgsql-odbc(at)postgresql(dot)org
Subject: Re: psqlodbc versioning
Date: 2004-07-08 18:08:50
Message-ID: 200407082008.50561.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

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.

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Mark Slagell 2004-07-08 20:59:19 Re: psqlodbc versioning
Previous Message Peter Eisentraut 2004-07-08 17:52:34 Re: Emergent: get table names from SageLine50 by ODBC