[Pgpool-general] Transactions not working properly from ODBC

Daniel.Crespo at l-3com.com Daniel.Crespo at l-3com.com
Wed Mar 11 21:48:09 UTC 2009


Hi,

I have a very particular problem here. I have two odbc configurations to
access PostgreSQL through pgpool and directly to PostgreSQL. Bottomline
is that INSERTs within a transaction block using ODBC to pgpool, does
not work.

Here's what I have:

Pgpool 2.2beta1
PostgreSQL 8.2.1
unixODBC 2.2.11

The SQL statement is simple:
BEGIN;
INSERT INTO test VALUES (1);
COMMIT;

>From isql (odbc interface, it's analogous to psql):
[root at coyote ~]# isql testdb
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> begin;
SQLRowCount returns -1
SQL> insert into test values (6);
[ISQL]ERROR: Could not SQLExecute
SQL> quit

The related logged error in pgpool is:


>From psql:
[root at coyote ~]# psql -U postgres -d testdb -p 9999
Welcome to psql 8.2.1, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

testdb=# begin;
BEGIN
testdb=# insert into test values (5);
INSERT 0 1
testdb=# commit;
COMMIT
testdb=# \q

The problem seems to be in ODBC, but it seems to happen ONLY when pgpool
is the connection interface to PostgreSQL. Any clue? Attached are the
log files.

Thanks,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgpool_from_psql.log
Type: application/octet-stream
Size: 26428 bytes
Desc: pgpool_from_psql.log
Url : http://pgfoundry.org/pipermail/pgpool-general/attachments/20090311/e882fd1d/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgpool_from_odbc.log
Type: application/octet-stream
Size: 34601 bytes
Desc: pgpool_from_odbc.log
Url : http://pgfoundry.org/pipermail/pgpool-general/attachments/20090311/e882fd1d/attachment-0003.obj 


More information about the Pgpool-general mailing list