Re: Some additions to pg_filedump...

From: Darren Reed <darrenr+postgres(at)fastmail(dot)net>
To: Alvaro Herrera <alvherre(at)CommandPrompt(dot)com>
Cc: Devrim GÜNDÜZ <devrim(at)CommandPrompt(dot)com>, pgsql-admin(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Some additions to pg_filedump...
Date: 2008-05-01 17:38:02
Message-ID: 4819FFFA.40601@fastmail.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Alvaro Herrera wrote:
> Darren Reed wrote:
>
>
>> I saw this, but when I went in search of activity, there was nothing.
>>
>> Look in:
>> http://sources.redhat.com/ml/rhdb/
>> http://sources.redhat.com/ml/rhdb-announce/
>> http://sources.redhat.com/ml/rhdb-cvs/
>>
>> All of the archives for 2008 are empty...
>>
>> It looks like "PostgreSQL - Red Hat Edition Project" is a defunct
>> project.
>>
>
> Perhaps it would be apropos for RedHat to donate pg_filedump under BSD
> license so we could include it in contrib? It's not like they're
> getting much benefit of it being under GPL.
>

Whether or not that was a hint, I sat down and wrote a program from scratch
to try and dump out only the data files. I suppose this might be a
version 1.0.

http://coombs.anu.edu.au/~avalon/pg_dumpdata.tgz

Alas, there is a catch...

I couldn't work out the binary format for all of the data types - as an
exercise
I tried to reverse engineer their behaviour from examining what got
stored and
for most of the simple types, I think I've got it right. I couldn't
fathom "time";
the geometric ones I couldn't easily find examples of how to insert data
- I am
assuming the web documentation is self explanatory to those who use it;
"double"
wasn't a straight fit of "double' from unix (huh?) and "bit" wants a
length to work
which was against what I was trying to achieve.

It might be interesting to write something that tries to deconstruct the
index files,
but to me there's no value in that - the value is in the data.

Cheers,
Darren

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ian Westmacott 2008-05-01 17:58:11 Re: 8.1.8 autovacuum missing databases
Previous Message Tom Lane 2008-05-01 16:44:51 Re: COPY errors when trying to convert from 7.4.19 to 8.3.1