Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fhapY-000271-9j for pgsql-general@arkaria.postgresql.org; Mon, 23 Jul 2018 13:24:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fhapW-0001Nw-Hs for pgsql-general@arkaria.postgresql.org; Mon, 23 Jul 2018 13:24:50 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fhapU-0001Np-J7 for pgsql-general@lists.postgresql.org; Mon, 23 Jul 2018 13:24:50 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fhapR-0003sP-2Z for pgsql-general@postgresql.org; Mon, 23 Jul 2018 13:24:47 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id E30EB3C0; Mon, 23 Jul 2018 09:24:42 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 23 Jul 2018 09:24:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=fLdLx2/hqiCuwGifrdAJwx0hmXFXp PGBNof3Z/pR51g=; b=JrAf7W87PfV32taiZCxX6zoiZ67hhL/xNvIcdjqkjEHkV Fej4AtqofhwggysHfsmwDBJMWKD88iCrdNBkeVKV8jFC7xo1Oi9cLIszAvRnMkrl 41U4yOS3w+P2N4blCXMcORQzuCbEmGlSYZR/h86ODdByV5WD1P0DFnOohV5xIh3a TYZN8AqUv3qaIKTKpjvlA4+HuUlEYIip8l1k6H7byur3wRYHcoNC4+Razz9EufOr lqbDo/dmY4dLbRKnzLiqPFV2p0vqthbC0m0R/pp/9e7mGLefDVCMza/GBELsA14K m5gS670WXr5VqPX+L8UZzc0odfkmfpw85bsnsmH8w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=fLdLx2 /hqiCuwGifrdAJwx0hmXFXpPGBNof3Z/pR51g=; b=HFq8EZDBtVTYGdqSrC/hWW Rn0k1Ggl85jtR3Dw7bl6VCZl0oSJa7ftx0Cmv21DzsduHHyUH4zJKwIZkCRbzRjL ngCRsg1Sd4g/tClrGYWWlTNlDJjJnP5zk/rlkg+HNgCpMkpQp+vsgvfzLLBXPbwD x0d9F6hL2rjf5r1thDhpVb52XJlhUNZqZ2LRHypb8rmlmByc/zW8Ome1zow6OsqW zyAh/Qnu0EcL0J92GRbheyfV64IaKfBBwKDVoqxK+DkHf0aOBQoyKdcRTxGuDV+z fEExttR4KLpti8eYyx6kpx1oDWn7GSB/0GZzIJ30lI7xY54AOCv85Nk76hOCSrzg == X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.134.181]) by mail.messagingengine.com (Postfix) with ESMTPA id 9B027E4621; Mon, 23 Jul 2018 09:24:41 -0400 (EDT) Subject: Re: copyManager Implementation :: in postgreSQL community Driver To: Yogi S , pgsql-general@postgresql.org References: From: Adrian Klaver Message-ID: Date: Mon, 23 Jul 2018 06:24:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 07/23/2018 02:11 AM, Yogi S wrote: > Hi All, > there is a copyManager() implementation in community version JDBC driver. > From what I understand from client end, we provide the file as a > fileReader and pass it on to the copyManager() instance. > > I see the performance of this copyManager is not comparable to PSQL > command line copy. Hence I wanted to know how differently is copyManager > is implemented? Where did you see this? From here: https://jdbc.postgresql.org/documentation/publicapi/index.html it looks like it uses COPY. > > does copyManager implement the copy command (/in server/) for the whole > file or, it does convert the file data into batches and implement copy > command ? From above link looks like you have your choice of using a Reader or InputStream and setting a buffer size for each. > > Regards > Yogi -- Adrian Klaver adrian.klaver@aklaver.com