Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxt7G-0001oB-KH for pgsql-admin@arkaria.postgresql.org; Tue, 11 Apr 2017 10:33:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cxt7G-0005pN-2E for pgsql-admin@arkaria.postgresql.org; Tue, 11 Apr 2017 10:33:42 +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.84_2) (envelope-from ) id 1cxt7F-0005pD-Fm for pgsql-admin@postgresql.org; Tue, 11 Apr 2017 10:33:41 +0000 Received: from mail-io0-x234.google.com ([2607:f8b0:4001:c06::234]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cxt7C-0003Vm-Av for pgsql-admin@postgresql.org; Tue, 11 Apr 2017 10:33:40 +0000 Received: by mail-io0-x234.google.com with SMTP id r16so73629767ioi.2 for ; Tue, 11 Apr 2017 03:33:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openscg-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=o/D13edm1g6N5CCq4PVuzARtp1VU47lX9Rt1UODG384=; b=hAqihOChfM9q3xlVl47rys2smpjC9kS0jojpETh+FCrCtjfdNU6gPElCDN26gildD0 wI5HDvJZgrJFkMCqcCvW1RF995ew4YDIRDU+U9pvnkAUfasue3NahRbKO5VnNcS/6s5h 2Vvo1E49hMRtBZOU3e9xUwMMmdSqxD+i0OJvjDbs8UW0P15M/vFsXFtK9KkFUEjnHN5T OShSP+8/1heD3f+hrDbhiAB0LZTxECyjxrRKbrdJJst6doCWY0W61VYEUHq5CSr8wjUV +jeGVkLqb23vR9Rvg2O7l4vBI/mfu6H9Fw2BgOGZBN+UmYaityDt8lb5d08z90YPDsyD +QAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=o/D13edm1g6N5CCq4PVuzARtp1VU47lX9Rt1UODG384=; b=cyYjdEfAsHrz1RB9+0WXofWX5/R5WN/uy8jI+nfJysJKVdfV8B6EyiYTcg8ccD7s6x RLuvqD0yHBQ51blR5XO+44jT0DJpOtUmNN5fSizVkjXI6D1+PufhKISHUpXmfNNey+NT gOEX7xTGathpgoh1F5KEJfl8T5KnE/VTu3Lu+DMI7d0kofSSgwPsheP/LirTmWyePhMF omcVXMT4cI7vrp50wOzxAE2cU5IavN+N0uMMfkzn4/ijKzWwyVlVY54m1NofuDZjaSxk 3W8xfhML7ZvCllI8/GZ44V6GbqHDPR+ZdjN5Tn/+ljP8/Oo6Ecoe493QbVlGZdobVURr 8Xqw== X-Gm-Message-State: AN3rC/4GLL0Pf8Hg+VAZ9kFmvb/AU1vsejogkng/DWAEMJpLlIsDDTeN mXp7b004ZpRwJuHYa1LE/A== X-Received: by 10.36.93.4 with SMTP id w4mr2966150ita.32.1491906815222; Tue, 11 Apr 2017 03:33:35 -0700 (PDT) Received: from [192.168.115.100] (cpe-66-66-220-41.rochester.res.rr.com. [66.66.220.41]) by smtp.gmail.com with ESMTPSA id q185sm704049itc.22.2017.04.11.03.33.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Apr 2017 03:33:34 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: pg_dump bug? From: Scott Mead X-Mailer: iPhone Mail (14E304) In-Reply-To: Date: Tue, 11 Apr 2017 06:33:33 -0400 Cc: pgsql-admin@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <9E1C43FE-68CD-4661-98E9-2E682723EB08@openscg.com> References: To: Andy Nercessian X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org > On Apr 11, 2017, at 05:20, Andy Nercessian wrote: >=20 > I wonder if anyone has experienced the problem I have with bloated pg_dum= p files. This problem exists in both standard pg_dumps and --insert-columns= type pg_dumps. I am using postgresql 9.5 on Windows 7. >=20 > Each table appears to have a 'copy table_name .... from stdin..' in multi= ple places (hundreds in some cases). The first copy statement appears genui= ne, but the second and subsequent statements appear to be in the middle of = another copy clause between records. The outer copy clause is sometimes fro= m the same table, and sometimes from a different table. Furthermore, from t= he existence of the number of backslashes \t, \\t, \\\\t which are variable= , it would appear as though nesting can be several levels deep. >=20 > I'm not copying the actual data because apart from anything else, it's a = giant text file. But this is roughly what it looks like: >=20 > ------------------------------------ > copy bills from ....=20 > Record 1 Column 1 \t Record 1 column 2 \t .... > Record 2 Column 2 \t Record 2 column 2 \t ... > ...... > copy adverts from .... < this is a nested copy statement unrelated to bil= ls, although occasionally it's another bills copy statement> >=20 > Record 88 Column 1 \t Record 88 Column 2 \t ... >=20 > ------------------------------------- >=20 > So in the middle of one copy statement - in between the records being cop= ied, another one mysteriously appears and the records are duplicated. Each = record can therefore be found in each of the copy statements, and the total= number of such duplications is in the hundreds for some tables. >=20 > What could be causing this? I've made only the following observations: > 1. The nested loops always occur in the same spot within the outer copy s= tatements (if records have not changed between dumps) and are preceded by t= he exact same column of the same record in each dump. > 2. It is clear that these copy statements are NOT part of any record.=20 > 3. The same behaviour exists for insert style dumps (where there is no co= py command). > 4. Each copy statement includes the entire table, NOT a selection of reco= rds from it. >=20 > In years of using pg_dump I have never come across this issue.=20 Is it possible that you have more than 1 pg_dump running simultaneously aga= inst the same output file? >=20 >=20 > --=20 > Andy=20 --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin