pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
Cc: pgsql-odbc@postgresql.org
Subject: Re: SQL_DATA_AT_EXEC processing broken for large objects in nightly git
Date: Mon, 09 Nov 2015 13:53:15 +0200
Message-ID: <5640892B.7060700@iki.fi> (raw)
In-Reply-To: <563A159A.5080104@dream.email.ne.jp>
References: <561F954E.7020808@serena.com>
	<5639B85F.7030408@dream.email.ne.jp>
	<5639E621.1020505@iki.fi>
	<563A159A.5080104@dream.email.ne.jp>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

On 11/04/2015 04:26 PM, Inoue, Hiroshi wrote:
>
>
> On 2015/11/04 20:04, Heikki Linnakangas wrote:
>> On 11/04/2015 09:48 AM, Inoue, Hiroshi wrote:
>>> Hi,
>>>
>>> I was able to reproduce it here.
>>> Because I can't understand the current code at once, please give me some
>>> time
>>> to solve the problem.
>>
>> I also started looking at this last week, and came up with a patch
>> that I think fixes it, but I got distracted before completing it and
>> replying here. So here's what I came up with...
>
> The solution seems to generate 2 transactions for 1 insertion.

Hmm, you're right, although that doesn't seem to be a new issue. The 
09.03.0400 driver does the same, see attached logs from 
log_statements=all. Would be nice to fix that, but it's a separate issue.

> The insertion seems to be rejected when ByteaAsLongVarBinary=1.

Oh. It works for me. How are you testing that?

- Heikki

-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Attachments:

large-object-data-at-exec-log.txt (text/plain, 1.2K) download master + large-object-data-at-exec-fix.patch: LOG: statement: BEGIN LOG: fastpath function call: "lo_creat" (OID 957) LOG: fastpath function call: "lo_open" (OID 952) LOG: fastpath function call: "lo_lseek" (OID 956) LOG: fastpath function call: "lowrite" (OID 955) LOG: fastpath function call: "lo_close" (OID 953) LOG: statement: COMMIT LOG: execute _PLAN0xfb58f0/_PLAN0xfb58f0: INSERT INTO lo_test_tab VALUES (101, $1) DETAIL: parameters: $1 = '16617' LOG: statement: DEALLOCATE "_PLAN0xfb58f0" REL-09_03_0400: LOG: statement: BEGIN LOG: execute <unnamed>: SELECT pg_catalog.lo_creat($1) DETAIL: parameters: $1 = '393216' LOG: execute <unnamed>: SELECT pg_catalog.lo_open($1, $2) DETAIL: parameters: $1 = '16688', $2 = '131072' LOG: execute <unnamed>: SELECT pg_catalog.lo_lseek($1, $2, $3) DETAIL: parameters: $1 = '0', $2 = '0', $3 = '0' LOG: execute <unnamed>: SELECT pg_catalog.lowrite($1, $2) DETAIL: parameters: $1 = '0', $2 = '\x0102030405060708' LOG: execute <unnamed>: SELECT pg_catalog.lo_close($1) DETAIL: parameters: $1 = '0' LOG: statement: COMMIT LOG: execute _PLAN0x1bf71f0: INSERT INTO lo_test_tab VALUES (101, $1) DETAIL: parameters: $1 = '16688' LOG: statement: DEALLOCATE "_PLAN0x1bf71f0"

view thread (9+ messages)  latest in thread

Message-ID: <5640892B.7060700@iki.fi>
Permalink:  ../5640892B.7060700@iki.fi/
Also on:    postgresql.org/message-id/5640892B.7060700@iki.fi

 · 

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: hlinnaka@iki.fi, h-inoue@dream.email.ne.jp
  Subject: Re: SQL_DATA_AT_EXEC processing broken for large objects in nightly git
  In-Reply-To: <5640892B.7060700@iki.fi>
  References: <561F954E.7020808@serena.com> <5639B85F.7030408@dream.email.ne.jp> <5639E621.1020505@iki.fi> <563A159A.5080104@dream.email.ne.jp> <5640892B.7060700@iki.fi>

* 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