Re: [HACKERS] inconvenient compression options in pg_basebackup

2011-05-26 Thread Peter Eisentraut
On tis, 2011-05-24 at 15:34 -0400, Tom Lane wrote: I would argue that -Z ought to turn on gzip without my having to write -z as well (at least when the argument is greater than zero; possibly -Z0 should be allowed as meaning no compression). My concern with that is that if we ever add

Re: [HACKERS] inconvenient compression options in pg_basebackup

2011-05-26 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On tis, 2011-05-24 at 15:34 -0400, Tom Lane wrote: I would argue that -Z ought to turn on gzip without my having to write -z as well (at least when the argument is greater than zero; possibly -Z0 should be allowed as meaning no compression). My

Re: [HACKERS] inconvenient compression options in pg_basebackup

2011-05-26 Thread Peter Eisentraut
On tor, 2011-05-26 at 16:54 -0400, Tom Lane wrote: But if you want to take such an extension into account right now, maybe we ought to design that feature now. What are you seeing it as looking like? My thought is that -z should just mean give me compression; a good default compression

Re: [HACKERS] inconvenient compression options in pg_basebackup

2011-05-26 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On tor, 2011-05-26 at 16:54 -0400, Tom Lane wrote: But if you want to take such an extension into account right now, maybe we ought to design that feature now. What are you seeing it as looking like? My thought is that -z should just mean give me

Re: [HACKERS] inconvenient compression options in pg_basebackup

2011-05-24 Thread Peter Eisentraut
On sön, 2011-05-22 at 16:43 -0400, Magnus Hagander wrote: On Fri, May 20, 2011 at 17:45, Peter Eisentraut pete...@gmx.net wrote: On fre, 2011-05-20 at 14:19 -0400, Magnus Hagander wrote: I suggest we add an argument-less option -z that means compress, and then -Z can be relegated to

Re: [HACKERS] inconvenient compression options in pg_basebackup

2011-05-24 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: Quick patch for verification. I chose the naming -z/--gzip to mirror GNU tar. I would argue that -Z ought to turn on gzip without my having to write -z as well (at least when the argument is greater than zero; possibly -Z0 should be allowed as meaning

Re: [HACKERS] inconvenient compression options in pg_basebackup

2011-05-22 Thread Magnus Hagander
On Fri, May 20, 2011 at 17:45, Peter Eisentraut pete...@gmx.net wrote: On fre, 2011-05-20 at 14:19 -0400, Magnus Hagander wrote: I suggest we add an argument-less option -z that means compress, and then -Z can be relegated to choosing the compression level. We can't just use -Z without a

Re: [HACKERS] inconvenient compression options in pg_basebackup

2011-05-20 Thread Magnus Hagander
On Thu, May 19, 2011 at 17:56, Peter Eisentraut pete...@gmx.net wrote: There is no way to tell pg_basebackup to just compress the thing in a default way.  You have to pick some number and then write -Z8 or something.  I suppose that interface was copied from pg_dump, but there it's not that

Re: [HACKERS] inconvenient compression options in pg_basebackup

2011-05-20 Thread Peter Eisentraut
On fre, 2011-05-20 at 14:19 -0400, Magnus Hagander wrote: I suggest we add an argument-less option -z that means compress, and then -Z can be relegated to choosing the compression level. We can't just use -Z without a parameter for that? You can't portably have a command-line option with

[HACKERS] inconvenient compression options in pg_basebackup

2011-05-19 Thread Peter Eisentraut
There is no way to tell pg_basebackup to just compress the thing in a default way. You have to pick some number and then write -Z8 or something. I suppose that interface was copied from pg_dump, but there it's not that commonly used because the right formats are compressed by default. I suggest