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 1gCVL0-0007gT-7F for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Oct 2018 19:49:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gCVKy-00015g-Ad for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Oct 2018 19:49:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gCVKy-00015N-32 for pgsql-hackers@lists.postgresql.org; Tue, 16 Oct 2018 19:49:04 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gCVKw-0001Ql-2a for pgsql-hackers@postgresql.org; Tue, 16 Oct 2018 19:49:03 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w9GJmxMR027172; Tue, 16 Oct 2018 15:48:59 -0400 From: Tom Lane To: Surafel Temesgen cc: PostgreSQL Hackers Subject: Re: pg_dump multi VALUES INSERT In-reply-to: References: Comments: In-reply-to Surafel Temesgen message dated "Tue, 16 Oct 2018 19:17:11 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <27170.1539719339.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 16 Oct 2018 15:48:59 -0400 Message-ID: <27171.1539719339@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Surafel Temesgen writes: > According to the documentation –inserts option is mainly useful for making > dumps that can be loaded into non-PostgreSQL databases and to reduce the > amount of rows that might lost during error in reloading but multi values > insert command are equally portable and compact and also faster to reload > than single row statement. I think it deserve an option of its own I don't actually see the point of this. If you want dump/reload speed you should be using COPY. If that isn't your first priority, it's unlikely that using an option like this would be a good idea. It makes the effects of a bad row much harder to predict, and it increases your odds of OOM problems with wide rows substantially. I grant that COPY might not be an option if you're trying to transfer data to a different DBMS, but the other problems seem likely to apply anywhere. The bad-data hazard, in particular, is probably a much larger concern than it is for Postgres-to-Postgres transfers. regards, tom lane