pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Berg <christoph.berg@credativ.de>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #12779: pg_dump -Fd doesn't care about -Z
Date: Wed, 18 Feb 2015 10:17:12 +0100
Message-ID: <20150218091712.GA26116@msg.credativ.de> (raw)
In-Reply-To: <CAB7nPqTLSv5qES=9hODzkX62V5XcivP1ij=_iahR_-SriD2AOA@mail.gmail.com>
References: <20150217153446.2590.24945@wrigleys.postgresql.org>
	<21598.1424199121@sss.pgh.pa.us>
	<CAB7nPqTLSv5qES=9hODzkX62V5XcivP1ij=_iahR_-SriD2AOA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Re: Michael Paquier 2015-02-18 <CAB7nPqTLSv5qES=9hODzkX62V5XcivP1ij=_iahR_-SriD2AOA@mail.gmail.com>
> On Wed, Feb 18, 2015 at 3:52 AM, Tom Lane wrote:
> > This doesn't look tremendously hard to fix, but it's not a one-liner
> > either.  Don't have time for it personally right now.
> 
> Interesting. The call to gzopen is missing the compression level,
> always passing either 'w' or 'wb', while for example to write with a
> compression level of 6 we should pass w6 or wb6.
> 
> The patch attached addresses that.

The patch works for me:

$ paste <(du ?.fd) <(du ?.fd.patched)
5392	0.fd	5392	0.fd.patched
1164	1.fd	1492	1.fd.patched
1164	2.fd	1448	2.fd.patched
1164	3.fd	1400	3.fd.patched
1164	4.fd	1244	4.fd.patched
1164	5.fd	1156	5.fd.patched
1164	6.fd	1164	6.fd.patched
1164	7.fd	1164	7.fd.patched
1164	8.fd	1164	8.fd.patched
1164	9.fd	1164	9.fd.patched

(I guess the next step would be to support other compressors, xz
yields a 860kB backup on this trivial test data...)

Mit freundlichen Grüßen,
Christoph Berg
-- 
Senior Berater, Tel.: +49 (0)21 61 / 46 43-187
credativ GmbH, HRB Mönchengladbach 12080, USt-ID-Nummer: DE204566209
Hohenzollernstr. 133, 41061 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer
pgp fingerprint: 5C48 FE61 57F4 9179 5970  87C6 4C5A 6BAB 12D2 A7AE


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (9+ messages)  latest in thread

Message-ID: <20150218091712.GA26116@msg.credativ.de>
Permalink:  ../20150218091712.GA26116@msg.credativ.de/
Also on:    postgresql.org/message-id/20150218091712.GA26116@msg.credativ.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: christoph.berg@credativ.de, michael.paquier@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: BUG #12779: pg_dump -Fd doesn't care about -Z
  In-Reply-To: <20150218091712.GA26116@msg.credativ.de>
  References: <20150217153446.2590.24945@wrigleys.postgresql.org> <21598.1424199121@sss.pgh.pa.us> <CAB7nPqTLSv5qES=9hODzkX62V5XcivP1ij=_iahR_-SriD2AOA@mail.gmail.com> <20150218091712.GA26116@msg.credativ.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox