pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Restore Question
5+ messages / 5 participants
[nested] [flat]

* Restore Question
@ 2002-02-08 21:36  Chris Ruprecht <chrup999@yahoo.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Chris Ruprecht @ 2002-02-08 21:36 UTC (permalink / raw)
  To: pgsql-admin

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




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Restore Question
@ 2002-02-08 21:58  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Chris Ruprecht <chrup999@yahoo.com>
  1 sibling, 0 replies; 5+ messages in thread

From: Tom Lane @ 2002-02-08 21:58 UTC (permalink / raw)
  To: Chris Ruprecht <chrup999@yahoo.com>; +Cc: pgsql-admin

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



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Restore Question
@ 2002-02-11 18:38  Chad R. Larson <clarson@eldocomp.com>
  parent: Chris Ruprecht <chrup999@yahoo.com>
  1 sibling, 0 replies; 5+ messages in thread

From: Chad R. Larson @ 2002-02-11 18:38 UTC (permalink / raw)
  To: Chris Ruprecht <chrup999@yahoo.com>; pgsql-admin

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




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Restore question
@ 2002-08-06 04:06  Steve Doerr <sdoerr@swbell.net>
  0 siblings, 1 reply; 5+ messages in thread

From: Steve Doerr @ 2002-08-06 04:06 UTC (permalink / raw)
  To: pgsql-admin

I've recently had to restore a couple of db's from backup and there were 
obsolete employee tables in the dbs.

Now I can't drop or rename this or any other tables to properly load new 
ones.

sqltest=# drop table employee
sqltest-#


I used pg_dump on the two dbs, and restored with the following:
psql -f /home/steve/080502sltestdb.out sqltest

Psql is also broken for the next command after one of these failed drops 
(when it's showing the - instead of =):

sqltest-# select * from employee;
ERROR:  parser: parse error at or near "select"

try again and:

sqltest=# select * from employee;
  id   | employee_id | name  | addr1 | addr2 | addr3 | workphone | 
homephone | grade  | title_position |  salary   | salarytype | 
exemptcode | gov_id | email | startdate  | enddate | notes

Does anyone recognize what's broken here or know what I might be able to 
do to fix it?

Thanks for any assistance.
Steve







^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Restore question
@ 2002-08-06 04:12  Stephan Szabo <sszabo@megazone23.bigpanda.com>
  parent: Steve Doerr <sdoerr@swbell.net>
  0 siblings, 0 replies; 5+ messages in thread

From: Stephan Szabo @ 2002-08-06 04:12 UTC (permalink / raw)
  To: Steve Doerr <sdoerr@swbell.net>; +Cc: pgsql-admin

On Mon, 5 Aug 2002, Steve Doerr wrote:

> I've recently had to restore a couple of db's from backup and there were
> obsolete employee tables in the dbs.
>
> Now I can't drop or rename this or any other tables to properly load new
> ones.
>
> sqltest=# drop table employee
> sqltest-#

Errm, you need a semicolon at the end of that.




^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2002-08-06 04:12 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-02-08 21:36 Restore Question Chris Ruprecht <chrup999@yahoo.com>
2002-02-08 21:58 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-02-11 18:38 ` Chad R. Larson <clarson@eldocomp.com>
2002-08-06 04:06 Restore question Steve Doerr <sdoerr@swbell.net>
2002-08-06 04:12 ` Re: Restore question Stephan Szabo <sszabo@megazone23.bigpanda.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox