From: Bob G. <bo...@rc...> - 2008-07-09 15:09:56
|
I would guess that both symptoms come from trying to reload a database that already contains your data. You MUST have a created EMPTY sql-ledger database before doing the restore. After you have a decent dump of your database (check that it does not contain the duplicate statements you mention in your email). The script I use is: # To restore, do su postgres psql template1 psql> DROP DATABASE "sql-ledger"; psql> CREATE DATABASE "sql-ledger"; psql> \q # Then: psql sql-ledger < sql-ledger.dump On Sun, 2008-06-29 at 21:33 -0500, Stuart Luppescu wrote: > On 日, 2008-06-29 at 19:25 -0500, Stuart Luppescu wrote: > > On 日, 2008-06-22 at 13:50 +0200, Rolf Stöckli wrote: > > > It seems your database already contains a table "cargo". You should find > > > it somewhere in your dump file. > > > 1) Make a backup. > > > 2) Insert at the beginning of sql/Pg-upgrade-2.7.0-2.7.5.sql: > > > > > > drop table if exists cargo; > > > > > > 3) Try again to upgrade. > > > > > > Stuart Luppescu schrieb: > > > > Error! > > > > create table cargo (id int not null, trans_id int not null, package > > > > text, netweight float4, grossweight float4, volume float4) > > > > ERROR: relation "cargo" already exists > > > > Rolf, I entered that line, but got this error: > > > > Error! > > drop table if exists cargo > > ERROR: syntax error at or near "exists" at character 15 > > > > Right after that is the line that creates the cargo relation. Perhaps I > > should try and comment out that line... > > So, I commented out the line, unlocked the database, logged in again, > found another offending line. Repeated this pattern perhaps 100 times. I > finally got to the point where the upgrade scripts would run to > completion. Hooray! I now have a functioning 2.8.15 system. > > However, when I do (AR|AP) -> Reports -> Transactions and select > ``Details'' all the lines display twice. Has anyone ever seen this > before? > |