Re: BUG #7590: Data corruption using pg_dump only with -Z parameter

From: Jan Vodička <hrtlik(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #7590: Data corruption using pg_dump only with -Z parameter
Date: 2012-10-09 19:07:37
Message-ID: CA+8ZZiKZpOgCnivbK_KpDxPC-9Wqwq7R=sQGARwAQLXTzK+4og@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

So is there any way how to get plain sql from this "corrupted" backup?
It would be nice to mention this behavior in manual.

2012/10/9 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>

> hrtlik(at)gmail(dot)com writes:
> > The following bug has been logged on the website:
> > Bug reference: 7590
> > Logged by: Jan Vodička
> > Email address: hrtlik(at)gmail(dot)com
> > PostgreSQL version: 9.2.1
> > Operating system: Windows 8
> > Description:
>
> > "pg_dump -Z1 my_db > backup" always make corrupted package.
>
> On Windows, that doesn't seem terribly surprising: Windows will probably
> do newline munging on the process's stdout, which will corrupt
> compressed data since it's not plain text. There's not a lot we can do
> to prevent that. Try it like this instead:
>
> pg_dump -Z1 -f backup.gz my_db
>
> to keep the data away from Windows' interference.
>
> regards, tom lane
>

--
Jan Vodička

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message devenmthaker 2012-10-10 05:07:59 BUG #7592: Installation of PostGresql at c:\Progam files folder does not create right permission on data folder
Previous Message Jan Vodička 2012-10-09 19:07:16 Re: BUG #7590: Data corruption using pg_dump only with -Z parameter