pg_dump custom format specification

Lists: pgsql-hackers
From: "Guillermo M(dot) Narvaja" <guillermo(dot)narvaja(at)fierro-soft(dot)com(dot)ar>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pg_dump custom format specification
Date: 2012-01-21 12:44:38
Message-ID: 1327149878.1292.11.camel@formosa
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Someone has some kind of specification or description of the pg_dump
custom format?

What I'm trying to do is an utility to remotelly syncronize postgresql
dumps, using lib_rsync to syncronize each table independently and
copying blobs only when sizes differ.

I've made the same using the Tar format, but I think most of the
features and optimizations like paralell-restore are now only available
with the custom format.

I will do the script in Python, so, I need to know how to parse and
write pg_dumps in custom format.

Thanks in advance.

--
Guillermo M. Narvaja
Lambda Sistemas S.R.L.
www.fierro-soft.com.ar
Tel: (5411) 4139-0493/4
Cel: (5411) 15-6783-4435
Email: guillermo(dot)narvaja(at)fierro-soft(dot)com(dot)ar
MSN: guillermo_narvaja(at)hotmail(dot)com
Skype: guillermonarvaja
Lavalleja 519 1er Piso - Ciudad de Buenos Aires - Argentina


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: guillermo(dot)narvaja(at)fierro-soft(dot)com(dot)ar
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump custom format specification
Date: 2012-01-21 13:08:44
Message-ID: 4F1AB8DC.3020103@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 01/21/2012 07:44 AM, Guillermo M. Narvaja wrote:
> Someone has some kind of specification or description of the pg_dump
> custom format?
>
> What I'm trying to do is an utility to remotelly syncronize postgresql
> dumps, using lib_rsync to syncronize each table independently and
> copying blobs only when sizes differ.
>
> I've made the same using the Tar format, but I think most of the
> features and optimizations like paralell-restore are now only available
> with the custom format.
>
> I will do the script in Python, so, I need to know how to parse and
> write pg_dumps in custom format.

You might find this useful: <https://gist.github.com/1258232> It's a
perl script that parses and prints out the header and TOC of a custom
format dump.

cheers

andrew