WebFaction
Community site: login faq

Hi,

I am migrating a OSQA site from AWS (bitnami stack) to WebFaction and I am running into a db migration issue. I installed a new OSQA instance using the install script and followed the instructions for database migration listed in the WebFaction documentation.

On the psql -U database_user database_name < file step, some of the tables were populated with data, but others were left empty. There were several errors about primary keys and relations to those empty tables. For example:

ERROR:  relation "forum_nodestate_node_id_state_type_key" already exists
ERROR:  multiple primary keys for table "forum_nodestate" are not allowed
ERROR:  constraint "forum_award_badge_id_fkey" for relation "forum_award" already exists

I tried going into psql and copying over the COPY statements for each table that did not populate, only to have each statement time out on me. Where do I go from here?

asked 06 Apr '13, 08:09

yobj
3112
accept rate: 0%


Please try setting a higher timeout at the command line before you go into postgres.

PGOPTIONS="-c statement_timeout=60000" psql -U database_user database_name

Since it is measured in milliseconds the value above is a full minute. Setting it to 0 will disable it all together, but not recommend on a shared server.

permanent link

answered 06 Apr '13, 08:46

aaront ♦♦
7664
accept rate: 27%

Thanks for the tip. I ended up creating a new, empty db and imported the dump there. For some reason, the default db created with the OSQA installation was not happy with the dump file, but a workaround was found. Thanks again.

(06 Apr '13, 17:48) yobj
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×109
×43
×5

question asked: 06 Apr '13, 08:09

question was seen: 11,617 times

last updated: 06 Apr '13, 17:48

                              
WEBFACTION
REACH US
SUPPORT
LEGAL
© COPYRIGHT 2003-2021 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM