pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Ruprecht <chrup999@yahoo.com>
To: PostGreSQL Admin Group <pgsql-admin@postgresql.org>
Subject: Problems with upgrading 7.1.3 -> 7.2
Date: Sat, 9 Feb 2002 11:36:52 -0600
Message-ID: <p05101202b88b099d7a59@[192.168.0.6]> (raw)

Hi guys,

Problems ...
OS = RedHat Linux 7.2 (kernel 2.4.9-21)
Build options: --prefix=/home/postgres --with-perl --with-tcl --with-python
Postgres Version 7.2 (Final) for loading data, 7.1.3 for dumping data

I have a database with a few smaller tables and one large one (23 
Million records). I tried to dump and load, using pg_dump -fc ... but 
I never got pg_restore to load the dump file back - I didn't try hard 
enough, I know but ...

I then wrote a script which copies all the data into flat files (copy 
xxx to '<file>';) and dumped the schema info separate (pg_dump -s). 
With an editor, I split the schema file into two, one to define the 
tables, one to define the indexes, I don't want to load data with the 
indexes active, it'll take for ever.

Dumping the big table was messy, because Postgres always complained 
that the file is too large. I'm running this on RedHat 7.2 which can 
create files as big as the disk. and yes, I have ulimit set to 
unlimited. Eventually I got it done by using "copy phonelog to 
stdout;" and redirected the output into the file I wanted. I then 
went ahead and split the file into three parts, using "split 
-10000000" and now got three ~ 1GB files called xaa xab and xac.

I set up the new environment (7.2), did an initdb, created the users 
and empty databases and loaded the first part of the schema info. 
Then I proceeded to load the raw data using "copy". All went well!

I then went ahead to create the indexes and this is where the fun begins:
psql:/tmp/phones.schema.2:136: ERROR:  tuplesort: unexpected end of data
CREATE
CREATE
CREATE
psql:/tmp/phones.schema.2:168: pqReadData() -- backend closed the 
channel unexpectedly.
         This probably means the backend terminated abnormally
         before or while processing the request.
psql:/tmp/phones.schema.2:168: connection to server was lost

Line 136 reads:
CREATE  INDEX "i_pl_date_line" on "phonelog" using btree ( "entity" 
"varchar_ops", "cdate" "date_ops", "frline" "int4_ops" );

Nothing wrong with this, right?

I then went, and said, ok, try again, of course, there are some 
errors for indexes which are already there - ignore those:

psql:/tmp/phones.schema.2:128: ERROR:  Cannot create index: 
'i_pc_countrycode' already exists
psql:/tmp/phones.schema.2:136: ERROR:  Relation 0 does not exist
psql:/tmp/phones.schema.2:144: ERROR:  Cannot create index: 
'i_pl_entity_date' already exists
psql:/tmp/phones.schema.2:152: ERROR:  Cannot create index: 
'i_pl_loadtimestamp' already exists
psql:/tmp/phones.schema.2:160: ERROR:  Cannot create index: 
'i_pl_prefix' already exists
psql:/tmp/phones.schema.2:168: pqReadData() -- backend closed the 
channel unexpectedly.
         This probably means the backend terminated abnormally
         before or while processing the request.
psql:/tmp/phones.schema.2:168: connection to server was lost

At this point, I don't know any further. As this is my production db, 
I will revert back to 7.1.3 for the time being. Any input is welcome.

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




view thread (2+ messages)  latest in thread

Message-ID: <p05101202b88b099d7a59@[192.168.0.6]>
Permalink:  ../p05101202b88b099d7a59@%5B192.168.0.6%5D/
Also on:    postgresql.org/message-id/p05101202b88b099d7a59@[192.168.0.6]

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: chrup999@yahoo.com
  Subject: Re: Problems with upgrading 7.1.3 -> 7.2
  In-Reply-To: <p05101202b88b099d7a59@[192.168.0.6]>
  References: <p05101202b88b099d7a59@[192.168.0.6]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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