Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TN0Zs-00015Q-5v for pgsql-bugs@postgresql.org; Sat, 13 Oct 2012 12:12:24 +0000 Received: from mail-pb0-f46.google.com ([209.85.160.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TN0Zq-0007kg-Dd for pgsql-bugs@postgresql.org; Sat, 13 Oct 2012 12:12:23 +0000 Received: by mail-pb0-f46.google.com with SMTP id rr4so3665819pbb.19 for ; Sat, 13 Oct 2012 05:12:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=cSeZEe31obnwihGai/C9ERbjRnrRNA6cnZbwhPGgYN4=; b=KiVSqMjr5PcIl6g6jxUYfklobjCnyBzqR9Y3E1Vy9lF55h1pnQc5EXjwdjIGFgaygh H5y2jgZaQbZ7q+ZlTEVE/WtW1S0/n2/n8ZMVsYdhn+7GMQeBIOfHVdlAeurKPmnI4KA1 vf++EX1zGwwWpsk4TmZbr4yuWqHTcepBHCTVMleMkfiesEYan1sF2ql76qXdf6AR4K1w F0btpiRoMIiJ06KrMGE3ZFETMEnCuNjQgMk2XrBLRSNZoU4+gWtGJ2kBDmpnCJ75RwKE yFQ2B4hD0ge24EfXi58jn2fV47gtCZ3B2sf33GUoJRQQWHxU0jp8qe4JSTTrwy5aGtfG 5Nkw== Received: by 10.68.216.2 with SMTP id om2mr21380834pbc.88.1350130340375; Sat, 13 Oct 2012 05:12:20 -0700 (PDT) Received: from ayaki.localdomain (58-7-144-234.dyn.iinet.net.au. [58.7.144.234]) by mx.google.com with ESMTPS id o7sm5910277pay.14.2012.10.13.05.12.17 (version=SSLv3 cipher=OTHER); Sat, 13 Oct 2012 05:12:19 -0700 (PDT) Message-ID: <50795A9E.40204@ringerc.id.au> Date: Sat, 13 Oct 2012 20:12:14 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: =?UTF-8?B?SmFuIFZvZGnEjWth?= CC: Ryan Kelly , pgsql-bugs@postgresql.org Subject: Re: BUG #7590: Data corruption using pg_dump only with -Z parameter References: <20121009190233.GB2751@llserver.lakeliving.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Gm-Message-State: ALoCoQkbZa+QNETi/WeRm4qsm/yaHMqmJF4jIibfB+Lwc+55V7lGpMUvmRCyDe9WIeMyhmPrmcC3 X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201210/117 X-Sequence-Number: 34417 On 10/10/2012 03:07 AM, Jan Vodička wrote: > = not able to unpack, invalid > > Try this one generated by "pg_dump -Z1 > backup.gz" in windows: > http://mstu.cz/~hrtlik/backup.gz > (0.5kB) > original "pg_dump > backup.gz" without compression: > http://mstu.cz/~hrtlik/backup.sql > > If you have any way how to get original, tell me. If Tom is right and the issue is end-of-line transformation, in theory you might be able to un-mungle newlines. The chances of \r\n occurring naturally in a tiny backup like that are not huge, so any \r\n in the data probably used to be a raw \n. Taking a copy of the DB and performing that substitution might get you a usable backup file. That's replacing all \x0d\x0a sequences with \x0a. Or I might be wrong and it's \x0d. This won't work on a larger backup where some \r\n sequences will occur naturally in compressed binary data. In those you're likely to have a much, much bigger job ahead of you. -- Craig Ringer