pg.ddx.io pgsql-odbc@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Hiroshi Inoue <inoue@tpf.co.jp>
To: Andreas Gaab <A.Gaab@scanlab.de>
Cc: 'pgsql-odbc@postgresql.org' <pgsql-odbc@postgresql.org>
Subject: Re: declare/fetch problem with pgpool 2.2.3; Postgres 8.4; ODBC 8.03.04.00
Date: Sun, 22 Nov 2009 09:21:16 +0900
Message-ID: <4B0883FC.6060202@tpf.co.jp> (raw)
In-Reply-To: <48DA836F3865C54B8FBF424A3B775AF6DE908686@Exchange-Server.scanlab-intern.de>
References: <48DA836F3865C54B8FBF424A3B775AF6DE908683@Exchange-Server.scanlab-intern.de>
<4B05C2AF.1050305@tpf.co.jp>
<48DA836F3865C54B8FBF424A3B775AF6DE908686@Exchange-Server.scanlab-intern.de>
Andreas Gaab wrote:
>> -----Ursprüngliche Nachricht-----
>> Von: Hiroshi Inoue [mailto:inoue@tpf.co.jp]
>> Gesendet: Donnerstag, 19. November 2009 23:12
>> An: Andreas Gaab
>> Cc: 'pgsql-odbc@postgresql.org'
>> Betreff: Re: [ODBC] declare/fetch problem with pgpool 2.2.3; Postgres 8.4; ODBC 8.03.04.00
>>
>> Hi Andreas,
>>
>> Andreas Gaab wrote:
>>> I encountered a problem using pgpool with two identical postgres 8.4
>>> servers as backends.>
>>>
>>> Activating the odbc-setting declare/fetch, our application creates an
>>> data mismatch error.
>>>
>>> As far as I can track down the problem, it is caused because the cursors
>>> are defined after an BEGIN, thus with load balancing disabled, but are
>>> CLOSED after the COMMIT, thus are only closed on one server. This leads
>>> to data inconsistency for the next query DECLARING an cursor.
>> Unfortunately I'm not familiar with pgpool.
>> Are DECLARE, FETCH and CLOSE regarded as members of SELECT family ?
>> If so, I'm suspicios if it's appropriate.
>> I would ask pgpool guys about it.
>>
>> regards,
>> Hiroshi Inoue
>
>
> Hi Hiroshi,
>
> DECLARE, FETCH and CLOSE are probably regarded as members of the SELECT family and thus are load balanced. The problem arises, because the cursors are defined inside BEGIN; ... COMMIT; , and thus are send to all backends, but are CLOSEd after the transaction, and thus load balanced, which leaves on cursor defined on one backend.
>
> The transaction block and handling of cursor is done by the odbc, isn't it?
Hi Andreas,
I told pgpool guys this issue at JPUGCon Yesterday.
I would get a reply in a few days.
regards,
Hiroshi Inoue
view thread (5+ messages) latest in thread
Message-ID: <4B0883FC.6060202@tpf.co.jp> Permalink: ../4B0883FC.6060202@tpf.co.jp/ Also on: postgresql.org/message-id/4B0883FC.6060202@tpf.co.jp ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-odbc@postgresql.org Cc: inoue@tpf.co.jp, A.Gaab@scanlab.de Subject: Re: declare/fetch problem with pgpool 2.2.3; Postgres 8.4; ODBC 8.03.04.00 In-Reply-To: <4B0883FC.6060202@tpf.co.jp> References: <48DA836F3865C54B8FBF424A3B775AF6DE908683@Exchange-Server.scanlab-intern.de> <4B05C2AF.1050305@tpf.co.jp> <48DA836F3865C54B8FBF424A3B775AF6DE908686@Exchange-Server.scanlab-intern.de> <4B0883FC.6060202@tpf.co.jp> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
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