Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1sQS-0004Dd-UI for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Mar 2019 12:47:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h1sQQ-0003Kx-PZ for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Mar 2019 12:47:02 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1sQQ-0003Kq-DQ for pgsql-hackers@lists.postgresql.org; Thu, 07 Mar 2019 12:47:02 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1sQN-0005qx-Ca for pgsql-hackers@postgresql.org; Thu, 07 Mar 2019 12:47:01 +0000 Received: by mail-qt1-x841.google.com with SMTP id s1so16837384qte.5 for ; Thu, 07 Mar 2019 04:46:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=70+22ZIRTLNwK7VgEdNBkqEH9Gn73CMVGk5qHgMRelI=; b=1m9SD4QwrWHfRJOSYeuXMkwDYgAfd+mP9OOYOOpzxbL+lNH87Zt3y2BN81y3bIvjj1 jdozw/HzCZypjM4lUvUg9bTwueo7nieeRp8aa30lZCPyGNgUZC8fU2v/LtaICNzQ47ID 4acAfKE7kDx2TBNVR4IwMM6PaRS3X9erBv4rEOjdrRBvHBZEWSchQqEWS+ZuRR5dJqOt g1ou9BxKTV6AKIoVhFxWEXT+znHHTkOIfHgTJl4dF8Bd9NZ3KOmUlmvuL1sHlIIJjL/x eN2j+PTUm0B7u3PPlbl9+8gm0YAYF7H4q3gfALSdyV2GR/wiLAmqNAroBNZGOWKCQnLH S9Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=70+22ZIRTLNwK7VgEdNBkqEH9Gn73CMVGk5qHgMRelI=; b=GqUYPus4XAuRs3gGzw+oTSV+WUnTtej1sMfhzbiomny+L5CyL71rA3D0ywoPlR8uC0 aIZzvURlZ09xjuLnLGNXFh6aeI6gSHZgOzZLArQrboiPIBlOZOrsJawz5wVCIKJ1ag4i 1sh9HyykF+zvjZZmvo0vtLQu0QLtmgiSc6OL/tsbU7TdDZpzDVqhun4wiiVvpf2rISoP EZp/e6GYSdm2XFi3sC1Qrv4cKEf7wGDgkQQrgdXwq+M+Ynq+UHErZCtsePjZxVamJIAe sNBtxvv4nrlk1m0EigfduR46drLEqxXSdGbP2/WYzFzMYAHxw+xWWtAdykYbIbRBK3dR NL3A== X-Gm-Message-State: APjAAAUNLw/wMLJJGVYr28dgQVfjVkqOE58b9EZWHLRRc9Bgke3pZpRo r5hs4qM7DQTLG0FMz1i37KVKhQ== X-Google-Smtp-Source: APXvYqyI4LzKFjhrHQbH48fzzeGWaheAfxJ3CHlaXgEcNz1yruIqBf8MuTZ6apqF4TZFcO4uwsmc8Q== X-Received: by 2002:ac8:3619:: with SMTP id m25mr10042149qtb.346.1551962817182; Thu, 07 Mar 2019 04:46:57 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id h10sm4254508qta.3.2019.03.07.04.46.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Mar 2019 04:46:55 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 09233121C9A; Thu, 7 Mar 2019 09:46:54 -0300 (-03) Date: Thu, 7 Mar 2019 09:46:54 -0300 From: Alvaro Herrera To: David Rowley Cc: Fabien COELHO , Surafel Temesgen , Dmitry Dolgov <9erthalion6@gmail.com>, PostgreSQL-development Subject: Re: pg_dump multi VALUES INSERT Message-ID: <20190307124653.GA13913@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Pushed, thanks! If anyone is feeling inspired, one additional test we could use is --rows-per-insert together with --on-conflict-do-nothing. I made a couple of edits to v17 before pushing, * rename strtol endptr variable so that it can be used by other strtol calls, if we ever have them * use pre-increment in if() test rather than separate line with post-increment; reduces line count by 2. * reworded --help output to: "number of rows per INSERT; implies --inserts" * added one row-ending archputs(")") which makes the repeated statement-ending archputs() match exactly. (Negligible slowdown, I expect) * moved DUMP_DEFAULT_ROWS_PER_INSERT to pg_dump.c from pg_dump.h * there was a space-before-comma in an error message, even immortalized in the test expected output. * remove the rows_per_insert_zero_col dump output file; the test can be done by adding the table to the rows_per_insert file. Add one more row to that zero-column table, so that the INSERT .. DEFAULT VALUES test verifies the case with more than one row. * changed the rows_per_insert to use 4 rows per insert rather than three; that improves coverage (table had 9 rows so it was always hitting the case where a full statement is emitted.) -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services