I don't think it's even possible. You're asking to take a file that is currently open with uncompressed data being actively written to it and compress it while this is taking place. Even if there were some curious way of masking or proxying the data being written to that filehandle, it seems like an awfully long and painful way to go for your results.

One way you could probably retool it for windows would be to use the windows version of zip.

# Substitute whatever tool you use to dump your db pg_dump -Udbadmin dbname | zip dbname-backup -

And then you could extract it with:

unzip -c dbname-backup -

--
"This alcoholism thing, I think it's just clever propaganda produced by people who want you to buy more bottled water." -- pedestrianwolf


In reply to Re^3: Stream data from application to Gzip by naChoZ
in thread Stream data from application to Gzip by TeraMarv

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.