[Lazarus] Recovering from unhandled exceptions

Hans-Peter Diettrich DrDiettrich1 at aol.com
Wed Oct 14 18:23:25 CEST 2009


Comments follow.

2009/10/14 Joost van der Sluis <joost at cnoc.nl>

> On Tue, 2009-10-13 at 17:50 -0300, Alexsander Rosa wrote:
> > It's weird to *require* a COMMIT on a simple SELECT,
>
> That's not strange. You can't even access Postgres (at any way) without
> a transaction. So you always have to start and end the transaction.
>

I would disagree -- it's possible to access PostgreSQL without a
transaction. I've been using libpq for ages, accessing directly from C/C++
code and starting transactions only for I/U/D commands.


> > but the CommitRetaining trick seemed to work. The system table
> > "pg_stat_activity" still shows the "<IDLE> in transaction" pending
>
> That's because a new transaction is started immediately by
> CommitRetaining.
>

Ok.


> >  query but the lock is no more -- at least I could execute a CREATE
> > TABLE normally.
>
> What you should really do is to set the right transaction isolation
> level.
>

Postgresql has only two isolation levels, and i'm using the default "read
commited" level. There's no "read uncommited" level, as the other one is
"serializable" that would only make things worst. I think we should not
*require" a transaction for every command -- the programmer should be able
to choose when to use them.


> Joost
>
>


-- 
Atenciosamente,
Alexsander da Rosa
Linux User #113925

"Extremismo na defesa da liberdade não é defeito.
Moderação na busca por justiça não é virtude."
-- Barry Goldwater
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20091014/04da1799/attachment-0004.html>


More information about the Lazarus mailing list