Re: [ODBC] Segmentation Fault in Postgres server when using psqlODBC

From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: Andres Freund <andres(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: Joshua Berry <yoberi(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: [ODBC] Segmentation Fault in Postgres server when using psqlODBC
Date: 2013-06-13 13:31:20
Message-ID: 51B9C9A8.9000109@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-odbc

(2013/06/12 1:26), Andres Freund wrote:
> On 2013-06-11 19:20:57 +0300, Heikki Linnakangas wrote:
>> On 11.06.2013 19:04, Joshua Berry wrote:
>>> Hiroshi Inoue has developed the attached patch to correct the issue that
>>> was reported. More of the dialogue can be found in the pgsql-odbc list.
>>
>> I tried to follow that thread over at pgsql-odbc, but couldn't quite
>> understand what the problem is. Did you have a test program to reproduce it?
>> Or failing that, what is the sequence of protocol messages that causes the
>> problem?
>
> I'd guess creating a SQL level WITH HOLD cursor and then fetching that
> via the extended protocol, outside the transaction, should do the trick.

OK I made a test C program which reproduces the crash.
The program uses libpq and a hack.

I attached the program.
Please modify the connect operation suitable for your environment.
Note that the connection should be non-ssl.
Also add error checkings if needed.

regards,
Hiroshi Inoue

Attachment Content-Type Size
heldcursor.c text/x-csrc 1.2 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2013-06-13 13:33:28 Re: [ODBC] Segmentation Fault in Postgres server when using psqlODBC
Previous Message Tom Lane 2013-06-12 21:36:34 Re: BUG #8227: referential integrity problem

Browse pgsql-odbc by date

  From Date Subject
Next Message Tom Lane 2013-06-13 13:33:28 Re: [ODBC] Segmentation Fault in Postgres server when using psqlODBC
Previous Message Christoph Berg 2013-06-13 12:54:18 Re: Testsuite failing on s390x