Re: [HACKERS] BUG: pg_dump generates corrupted gzip file in Windows

2017-06-19 Thread Tom Lane
I wrote: > That patch looks reasonable to me, will push. On closer inspection, the patch did contain a bug: it tested for compression being active with "compression > 0", which is the wrong thing --- everyplace else in pg_dump tests with "compression != 0". This is important because

Re: [HACKERS] BUG: pg_dump generates corrupted gzip file in Windows

2017-06-19 Thread Tom Lane
Ashutosh Sharma writes: > On Mon, Jun 19, 2017 at 12:25 PM, Amit Kapila wrote: >> On Mon, Jun 19, 2017 at 11:42 AM, Ashutosh Sharma >> wrote: >>> On Fri, Mar 24, 2017 at 10:16 PM, Robert Haas wrote:

Re: [HACKERS] BUG: pg_dump generates corrupted gzip file in Windows

2017-06-19 Thread Ashutosh Sharma
Hi, On Mon, Jun 19, 2017 at 12:25 PM, Amit Kapila wrote: > On Mon, Jun 19, 2017 at 11:42 AM, Ashutosh Sharma > wrote: >> Hi, >> >> On Fri, Mar 24, 2017 at 10:16 PM, Robert Haas wrote: >>> On Fri, Mar 24, 2017 at 6:44 AM,

Re: [HACKERS] BUG: pg_dump generates corrupted gzip file in Windows

2017-06-19 Thread Amit Kapila
On Mon, Jun 19, 2017 at 11:42 AM, Ashutosh Sharma wrote: > Hi, > > On Fri, Mar 24, 2017 at 10:16 PM, Robert Haas wrote: >> On Fri, Mar 24, 2017 at 6:44 AM, Kuntal Ghosh >> wrote: ASAICU, if we use binary mode, output

Re: [HACKERS] BUG: pg_dump generates corrupted gzip file in Windows

2017-06-19 Thread Ashutosh Sharma
Hi, On Fri, Mar 24, 2017 at 10:16 PM, Robert Haas wrote: > On Fri, Mar 24, 2017 at 6:44 AM, Kuntal Ghosh > wrote: >>> ASAICU, if we use binary mode, output is stored bit by bit. In ASCII >>> mode, cmd pokes its nose and does CR / LF conversions

Re: [HACKERS] BUG: pg_dump generates corrupted gzip file in Windows

2017-03-24 Thread Robert Haas
On Fri, Mar 24, 2017 at 6:44 AM, Kuntal Ghosh wrote: >> ASAICU, if we use binary mode, output is stored bit by bit. In ASCII >> mode, cmd pokes its nose and does CR / LF conversions on its own. So, >> whenever we want compression on a plain-text dump file, we can set

Re: [HACKERS] BUG: pg_dump generates corrupted gzip file in Windows

2017-03-24 Thread Kuntal Ghosh
On Fri, Mar 24, 2017 at 2:17 PM, Kuntal Ghosh wrote: > On Fri, Mar 24, 2017 at 12:35 PM, Craig Ringer wrote: >> On 24 March 2017 at 14:07, Kuntal Ghosh wrote: >>> On Fri, Mar 24, 2017 at 11:28 AM, Kuntal Ghosh >>>

Re: [HACKERS] BUG: pg_dump generates corrupted gzip file in Windows

2017-03-24 Thread Kuntal Ghosh
On Fri, Mar 24, 2017 at 12:35 PM, Craig Ringer wrote: > On 24 March 2017 at 14:07, Kuntal Ghosh wrote: >> On Fri, Mar 24, 2017 at 11:28 AM, Kuntal Ghosh >> wrote: >>> Hello, >>> In Windows, if one needs to take a

Re: [HACKERS] BUG: pg_dump generates corrupted gzip file in Windows

2017-03-24 Thread Craig Ringer
On 24 March 2017 at 14:07, Kuntal Ghosh wrote: > On Fri, Mar 24, 2017 at 11:28 AM, Kuntal Ghosh > wrote: >> Hello, >> In Windows, if one needs to take a dump in plain text format (this is >> the default option, or can be specified using

Re: [HACKERS] BUG: pg_dump generates corrupted gzip file in Windows

2017-03-24 Thread Kuntal Ghosh
On Fri, Mar 24, 2017 at 11:28 AM, Kuntal Ghosh wrote: > Hello, > In Windows, if one needs to take a dump in plain text format (this is > the default option, or can be specified using -Fp) with some level of > compression (-Z[0-9]), an output file has to > be specified.