Re: Waiting for Commit

From: "Pablo Montilla" <melkor(at)adinet(dot)com(dot)uy>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Waiting for Commit
Date: 2004-03-28 00:41:17
Message-ID: 000201c4145e$c1fbc300$601d28c8@athena
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks for your response, I've been doing some tests, and got to a
point where I can put a case for consideration.

This is going get a bit more specific, so if this gets off topic,
please bear with me.

I'm programming in C# using the Npgsql driver (don't think its the
offending code, as i've traced all the code, and the commands are
going sequentially to the database).

This is a test case that fails:

01.database.connect();
02.database.execute("DELETE FROM test");
03.for(int i = 0; i < 30; i++) {
04. database.beginTransaction();
05. database.execute("INSERT INTO test VALUES(1, 'test')");
06. database.commitTransaction();
07.}
08.IDataReader
09.reader = database.executeReader("SELECT * FROM test");
10.for(int i = 0; i < 30; i++) {
11. assert(reader.Read());
12.}
13.database.disconnect();

The last part of the test, fails in the iteration 26. If I move the
transactions from lines 04 and 06 outside the loop, I don't see the
error.

Each reader, is created using another connection (the connection is
created automatically).

Any ideas? What I'm doing wrong?

Thanks,
Pablo
- --
I have never been able to understand why it is that just because
I am unintelligible nobody can understand me.
-- Milton Mayer

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBQGYfK76KEogX0AkqEQID+wCfWY0vb6yR69tFXnysfNv0gbkynhAAn3Jj
NIl1qXlXTDsz1NFlhrQ+4ri6
=6FYu
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pablo Montilla 2004-03-28 02:14:36 Re: Waiting for Commit
Previous Message Terry Lee Tucker 2004-03-27 22:09:37 Re: Passing a row