Skip site navigation (1) Skip section navigation (2)

Re: pg_restore problem

From: "Jules Alberts" <jules(dot)alberts(at)arbodienst-limburg(dot)nl>
To: pgsql-novice(at)postgresql(dot)org
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: pg_restore problem
Date: 2002-08-15 09:13:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On 14 Aug 2002 at 11:13, Tom Lane wrote:
> "Jules Alberts" <jules(dot)alberts(at)arbodienst-limburg(dot)nl> writes:
> > BTW in between I do a dropdb mydb
> You probably defined plpgsql in template1, so that when you do "createdb
> mydb" there's already a plpgsql definition in mydb.  This confuses
> pg_restore, which is expecting to restore into a virgin database. Try
> "createdb -T template0 mydb" to make a database with no local additions,
> and then restore into that.
>    regards, tom lane

Thanks, that was it! I did a complete reinstall of 7.2.1 to make sure 
everything is default again (it's a test environment).

Now I have another pg_restore problem. When I lo_import() an image I 
get a OID, say 241803. An lo_export() works OK. Then I do a backup with

	pg_dump --oids --blobs --format=c --compress=9 \
		--verbose --file=mydb.dump mydb &> mydbBackup.log

then a dropdb mydb, then a restore with

	pg_restore --dbname=mydb --verbose --format=c \
		mydb.dump &> mydbRestore.log

This restores the OIDs of all my tables (as I expected), except the 
BLOBs, lo_export(241803, '/tmp/foobar') says "ERROR inv_open large 
object 241803 not found". This is a problem because I save the BLOBs 
OID as a reference in other tables. Am I doing something wrong or is 
this a known issue?


Jules Alberts.

In response to


pgsql-novice by date

Next:From: solDate: 2002-08-15 11:45:31
Subject: FATAL 1:Sorry, too many clients
Previous:From: Andy PearceDate: 2002-08-15 01:22:55
Subject: Trigger Function

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group