Thread: Restore Question

Restore Question

From
Chris Ruprecht
Date:
Hi all,

I'm upgrading from 7.1.3 to 7.2. Right now, I'm busy doing backups,
so I have a little time to think.
I'm thinking of changing some of the int8 fields into int4 fields,
since this would save about 4 bytes/record and with 25 Million
records, this is 100 MB just in the data per field, but the int8
values are also used in a few indexes, so I might save maybe a GB or
so.
The problem is, that the file which contains the pg_dump data is 2.8
GB in size and I don't want to tackle that with an editor. (Schema
info lives in the front of the file, then follows the data, then
follow the indexes).

In the old days, before editors where written is such a way that they
suck all the data into their buffer all at once, we had stuff which
only loaded so-and-so many KB at a time. Is there still something
like that out there which is safe to use with a Postgres dump file?

Best regards,
Chris
--
Chris Ruprecht
Network grunt and bit pusher extraordinaíre

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


Re: Restore Question

From
Tom Lane
Date:
Chris Ruprecht <chrup999@yahoo.com> writes:
> The problem is, that the file which contains the pg_dump data is 2.8
> GB in size and I don't want to tackle that with an editor.

It may be too late if you already started the dump, but --- you could
easily avoid that issue by dumping schema and data separately.

Otherwise, consider using "sed" or some such to make the substitutions.

            regards, tom lane

Re: Restore Question

From
"Chad R. Larson"
Date:
At 02:36 PM 2/8/2002 , Chris Ruprecht wrote:
>In the old days, before editors where written is such a way that they suck
>all the data into their buffer all at once, we had stuff which only loaded
>so-and-so many KB at a time. Is there still something like that out there
>which is safe to use with a Postgres dump file?

I'd use sed (the Stream EDitor).


         -crl
--
Chad R. Larson (CRL22)    chad@eldocomp.com
   Eldorado Computing, Inc.   602-604-3100
      5353 North 16th Street, Suite 400
        Phoenix, Arizona  85016-3228