Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 098009FB3A5 for ; Thu, 2 Aug 2007 05:12:04 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 04722-07 for ; Thu, 2 Aug 2007 05:11:57 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.179]) by postgresql.org (Postfix) with ESMTP id 8A8ED9FA28D for ; Thu, 2 Aug 2007 05:11:59 -0300 (ADT) Received: by wa-out-1112.google.com with SMTP id k40so526261wah for ; Thu, 02 Aug 2007 01:11:58 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=EWhdK5EERzMhkVQlpNBsdXe4RRQ7rcFAZTC6HWxm3rbM1derJlJECKoCjbuWFWg+dHYwq3u8RZCk8sayO8al3U9/lVLNEriv9QbhZn48mJbheopIenxEFOz/M6FlTS2klBsmqLnr8+k30eSSLe7LkKT4B15L4fhpePcT1fgrQCc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=S3RzHSHsLLzGEipghY7ympr594usui8o0Bt1Aic+/kGYc+tm1bCDJ6G7PoR1h7axC4K2Iq7wW7/DIDApey65KDDlv2fGbryR53+WEhWfcNt/ZFtPj3ZrQ4ftDE1oyCQ2d9S6YAnblKP7gRts6TXjWxXVZWO43P83TBbeowe/7lQ= Received: by 10.114.38.2 with SMTP id l2mr1582267wal.1186042317711; Thu, 02 Aug 2007 01:11:57 -0700 (PDT) Received: by 10.114.147.16 with HTTP; Thu, 2 Aug 2007 01:11:57 -0700 (PDT) Message-ID: Date: Thu, 2 Aug 2007 11:11:57 +0300 From: "Kalle Hallivuori" To: pgsql-jdbc@postgresql.org Subject: Bulk copy with connection locking patch MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: ea0b0f12f5267d16 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/5 X-Sequence-Number: 17318 Hi again. I added a new proposal patch at http://kato.iki.fi/sw/db/postgresql/jdbc/copy/ It locks the QueryExecutor and thus the connection so that control can return to user while the connection is in Copy state. It's considerably more code than the minimal version, but provides copying into database as an OutputStream and from database as an InputStream, which might be considered more logical usage. It's only for 8.2 for now; I'll be able to clean it up for other versions next week or so. I could also write unit tests of thread conflicts etc. if there is any interest in this approach. I could provide wrapper classes for object-based copying once we settle on an implementation of the stream level approach. Oh, and I'd be willing to try my hands on binary copy wrapping as well. I'd be pleased to have any input about this approach. Hope this helps someone, -- Kalle Hallivuori +358-41-5053073 http://korpiq.iki.fi/