Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id A7262B5DC4C for ; Mon, 29 Aug 2011 10:11:43 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 38958-10 for ; Mon, 29 Aug 2011 13:11:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pz0-f42.google.com (mail-pz0-f42.google.com [209.85.210.42]) by mail.postgresql.org (Postfix) with ESMTP id 6F7EFB5DC49 for ; Mon, 29 Aug 2011 10:11:37 -0300 (ADT) Received: by pzk37 with SMTP id 37so14266287pzk.15 for ; Mon, 29 Aug 2011 06:11:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=VVzV4+ZC7SHT/hz3V27awCXoAQfGu+7wJlu+89M/aVQ=; b=EMVBBJcberC04VpBIVHWjlkhqB/sIQ1CstsuYGsBPbOjhsBDzQUgzu7fQGL8o+DkqQ g/v+EXpMz3zP2Xt6gaKFNGifyZlTnH4+CKyVN6bXxUfB+PH/Yq5ARL/tLNmj0evbCkjY qO62YUNkZxmgaxmeSqeE/eCbK9ELWuwT7nUPU= Received: by 10.143.66.19 with SMTP id t19mr334378wfk.252.1314623497200; Mon, 29 Aug 2011 06:11:37 -0700 (PDT) Received: from [192.168.11.3] ([116.225.153.151]) by mx.google.com with ESMTPS id e6sm3557758wfh.2.2011.08.29.06.11.29 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Aug 2011 06:11:35 -0700 (PDT) Message-ID: <4E5B8FF7.4040007@gmail.com> Date: Mon, 29 Aug 2011 21:11:19 +0800 From: Rural Hunter User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: plsql gets "out of memory" Content-Type: text/plain; charset=GB18030; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.889 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201108/223 X-Sequence-Number: 38210 Hi all, I'm a newbie here. I'm trying to test pgsql with my mysql data. If the performance is good, I will migrate from mysql to pgsql. I installed pgsql 9.1rc on my Ubuntu server. I'm trying to import a large sql file dumped from mysql into pgsql with 'plsql -f'. The file is around 30G with bulk insert commands in it. It rans several hours and then aborted with an "out of memory" error. This is the tail of the log I got: INSERT 0 280 INSERT 0 248 INSERT 0 210 INSERT 0 199 invalid command \n out of memory On server side, I only found these errors related to invalid UTF-8 characters which is related to escape characters when exported from mysql. 2011-08-29 19:19:29 CST ERROR: invalid byte sequence for encoding "UTF8": 0x00 2011-08-29 19:55:35 CST LOG: unexpected EOF on client connection My understanding is this is a client side issue and not related to any server memory setting. But how can ajust the memory setting of the psql program? To handle the escape character '\' which is default in mysql but not in pgsql, I have already made some rough modification to the exported sql dump file: sed "s/,'/,E'/g" |sed 's/\\0/ /g'. I guess there might still be some characters missing handling and that might cause the insert command to be split to several invalid pgsql commands. Would that be the cause of the "out of memory" error?