pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedBack-end problems with Delphi and ODBCExpress
3+ messages / 2 participants
[nested] [flat]
* Back-end problems with Delphi and ODBCExpress
@ 1998-08-12 19:51 Bryan Brunton <bryan@flesherfab.com>
1998-08-12 20:03 ` Re: [INTERFACES] Back-end problems with Delphi and ODBCExpress Byron Nikolaidis <byronn@insightdist.com>
0 siblings, 1 reply; 3+ messages in thread
From: Bryan Brunton @ 1998-08-12 19:51 UTC (permalink / raw)
To: pgsql-interfaces
Although I've only found one other person using Delphi, ODBCExpress, and
Postgres, I thought I'd post this just to see if some one can provide
enlightenment:
The source of the problem is setting the Active property on a Dataset
that
is linked to a grid while at the same time doing an update to that table
in a form's
show event. It appears that the active dataset and the update to the
table exert
some kind of lock on the table. I can't update or select after that.
In this locked
state, I can't view the table from MS Access or even select the records
from psql
(used from telnet to the database server) even after the Delphi app is
killed. The table
stays in this locked state for what seems to be a random amount of time,
usually
for a very long time forcing the postmaster to be restarted. I can
however view the
table properties from pgAdmin (the VB app).
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [INTERFACES] Back-end problems with Delphi and ODBCExpress
1998-08-12 19:51 Back-end problems with Delphi and ODBCExpress Bryan Brunton <bryan@flesherfab.com>
@ 1998-08-12 20:03 ` Byron Nikolaidis <byronn@insightdist.com>
0 siblings, 0 replies; 3+ messages in thread
From: Byron Nikolaidis @ 1998-08-12 20:03 UTC (permalink / raw)
To: Bryan Brunton <bryan@flesherfab.com>; +Cc: pgsql-interfaces
Bryan Brunton wrote:
> Although I've only found one other person using Delphi, ODBCExpress, and
> Postgres, I thought I'd post this just to see if some one can provide
> enlightenment:
>
> The source of the problem is setting the Active property on a Dataset
> that
> is linked to a grid while at the same time doing an update to that table
> in a form's
> show event. It appears that the active dataset and the update to the
> table exert
> some kind of lock on the table. I can't update or select after that.
> In this locked
> state, I can't view the table from MS Access or even select the records
> from psql
> (used from telnet to the database server) even after the Delphi app is
> killed. The table
> stays in this locked state for what seems to be a random amount of time,
> usually
> for a very long time forcing the postmaster to be restarted. I can
> however view the
> table properties from pgAdmin (the VB app).
Turn OFF the Driver Option "Use Declare/Fetch" and see if that helps.
Byron
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [INTERFACES] Back-end problems with Delphi and ODBCExpress
@ 1998-08-12 21:30 Byron Nikolaidis <byronn@insightdist.com>
0 siblings, 0 replies; 3+ messages in thread
From: Byron Nikolaidis @ 1998-08-12 21:30 UTC (permalink / raw)
To: Bryan Brunton <bryan@flesherfab.com>; +Cc: pgsql-interfaces
Bryan Brunton wrote:
> Turning off that option fixed the problem. I'm concerned that the
> back-end
> should be effected by this. Shouldn't it be able to recover from
> confusing
> statements that a ODBC driver sends it, rather than locking up like
> this?
>
The reason it locked up with the declare/fetch option ON is because postgres
cursors require a transaction to be started. The table being viewed inside
the transaction is then locked from any other process even viewing it.
Without the declare/fetch option, no transactions are used, so it works.
The simple explanation is that the backend locking strategy needs to be
improved. This is a well-known limitation of postgres that is being worked
on (I believe by Vadim). He mentioned something recently on the hackers
list about working on readers not locking other readers, which is exactly
what is happening here. Sounded interesting.
Byron
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~1998-08-12 21:30 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-08-12 19:51 Back-end problems with Delphi and ODBCExpress Bryan Brunton <bryan@flesherfab.com>
1998-08-12 20:03 ` Byron Nikolaidis <byronn@insightdist.com>
1998-08-12 21:30 Re: [INTERFACES] Back-end problems with Delphi and ODBCExpress Byron Nikolaidis <byronn@insightdist.com>
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