RE: RE: [HACKERS] pg_dump & blobs - editable dump?

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>, Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>, pgsql-hackers(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Cc: Pavel(at)Janik(dot)cz
Subject: RE: RE: [HACKERS] pg_dump & blobs - editable dump?
Date: 2000-07-12 15:11:04
Message-ID: 3.0.5.32.20000713011104.02ef1940@mail.rhyme.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

At 15:25 12/07/00 +0100, Peter Mount wrote:
>No he didn't, just I've been sort of lurking on this subject ;-)
>
>Actually, tar files are simply a small header, followed by the file's
>contents. To add another file, you simply write another header, and contents
>(which is why you can cat two tar files together and get a working file).
>
>http://www.goice.co.jp/member/mo/formats/tar.html has a nice brief
>description of the header.
>

Damn! I knew someone would call my bluff.

As you say, it looks remarkably simple.

A couple of questions:

136 12 bytes Modify time (in octal ascii)

...do you know the format of the date (seconds since 1970?).

157 100 bytes Linkname ('\0' terminated, 99 maxmum length)

...what's this? Is it the target for symlinks?

329 8 bytes Major device ID (in octal ascii)
337 8 bytes Minor device ID (in octal ascii)345 167 bytes
Padding

...and what should I set these to?

>As for a C api with a compatible licence, if needs must I'll write one to
>your spec (maidast should be back online in a couple of days, so I'll be
>back in business development wise).

If you're serious about the offer, I'd be happy. But, given how simple the
format is, I can probably tack in into place myself.

There is a minor problem. Currently I compress the output stream as I
receive it from PG, and send it to the archive. I don't know how big it
will be until it is written. The custom output format can handle this, but
in streaming a tar file to tape, I have to know the file size first. This
means writing to /tmp. I supose that's OK, but I've been trying to avoid it.

----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.C.N. 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 0500 83 82 82 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/

Browse pgsql-general by date

  From Date Subject
Next Message Philip Warner 2000-07-12 15:16:49 Re: [HACKERS] pg_dump & blobs - editable dump?
Previous Message Alex Bolenok 2000-07-12 15:06:59 Re: Retrieving INTERVAL as float hours?

Browse pgsql-hackers by date

  From Date Subject
Next Message Tim Perdue 2000-07-12 15:14:29 Re: 7.0.2 issues / Geocrawler
Previous Message Ross J. Reedstrom 2000-07-12 15:00:08 Re: 7.0.2 issues / Geocrawler