From: | Madison Kelly <linux(at)alteeve(dot)com> |
---|---|
To: | Steve Wampler <swampler(at)noao(dot)edu> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Determining size of a database before dumping |
Date: | 2006-10-02 20:52:15 |
Message-ID: | 45217BFF.1020902@alteeve.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Steve Wampler wrote:
> Madison Kelly wrote:
>> Hi all,
>>
>> I am (re)writing a backup program and I want to add a section for
>> backing up pSQL DBs. In the planning steps (making sure a given
>> destination has enough space) I try to calculate how much space will be
>> needed by a 'pg_dump' run *before* actually dumping it.
>
> I suppose:
>
> pg_dump $PGD_OPTIONS | wc -c
>
> isn't efficient enough, right? Without knowing the options you plan
> to use with pg_dump (compression? dump just tables?, etc.) this is
> going to be hard to get a decent estimate from...
>
For now, lets assume I am doing a raw dump (no compression) and no fancy
switches. I would probably err of the side of caution and try dumping
OIDs and all schema (plus whatever else is needed to insure a full
restore to a clean DB).
I could try piping the dump into something like 'wc' but with very large
DBs I'd be worried about the (tremendous) disk I/O that would cause.
This is also why I am hoping Pg keeps this info somewhere.
Madison
From | Date | Subject | |
---|---|---|---|
Next Message | Brandon Aiken | 2006-10-02 21:11:20 | Re: Performance and Generic Config after install |
Previous Message | Alexander Staubo | 2006-10-02 20:46:37 | Re: Determining size of a database before dumping |