OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



error updating

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

error updating

Postby vazquezm » Wed Jul 26, 2006 9:51 am

Dear Alec,

I am not good with this. When updating OJS from 2.1.0.1, I got this error:

ERROR: Upgrade failed: DB: ERROR: duplicate key violates unique constraint "email_templates_default_pkey"


I am using PostgreSQL 8.1.

I have trying the manual updating with the sentence of sql propose by the OJS, and I got this errors:

NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "versions_pkey" for table "versions"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "site_pkey" for table "site"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "scheduled_tasks_pkey" for table "scheduled_tasks"
NOTICE: CREATE TABLE will create implicit sequence "users_user_id_seq" for serial column "users.user_id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "users_pkey" for table "users"

ERROR: column "url" does not exist


help me, please.
vazquezm
 
Posts: 35
Joined: Mon Mar 13, 2006 7:35 am

Postby eruthes » Wed Jul 26, 2006 12:22 pm

I'm having the same problem.
The Postgresql works with SEQUENCES to make the AUTOINCREMENT. The SEQUENCE for a table is created automatically when the table is created.

The DB Update Script is working of the following form:
    *copy the table content to a TMP one;
    *drop the table;
    *recreate the table with the new structure;
    *copy the TMP content to new table;


When copying the content of the TMP table to new table, the primary_keys of these tables also are being copied. On making this, the Postgresql does not bring up to date the SEQUENCE, generating the mentioned error.

To correct this problem and to keep the portabilidade of the code for other data bases, we need to remove the primary_keys fro the insert query and order the insertion to guarantee the right order.
Makes the following changes (in manual update obviously):

*line 1465
from:
Code: Select all
INSERT INTO email_templates_default ( email_id, email_key, can_disable, can_edit, from_role_id, to_role_id) SELECT email_id, email_key, can_disable, can_edit, from_role_id, to_role_id FROM email_templates_default_tmp;

to:
Code: Select all
INSERT INTO email_templates_default ( email_key, can_disable, can_edit, from_role_id, to_role_id) SELECT email_key, can_disable, can_edit, from_role_id, to_role_id FROM email_templates_default_tmp;


*line 1448
from:
Code: Select all
SELECT * INTO TEMPORARY TABLE email_templates_default_tmp FROM email_templates_default;

to:
Code: Select all
SELECT * INTO TEMPORARY TABLE email_templates_default_tmp FROM email_templates_default ORDER BY email_id;


*line 1514
from:
Code: Select all
SELECT * INTO TEMPORARY TABLE email_templates_tmp FROM email_templates;

to:
Code: Select all
SELECT * INTO TEMPORARY TABLE email_templates_tmp FROM email_templates ORDER BY email_id;


*line 1529
from:
Code: Select all
INSERT INTO email_templates (email_id, email_key, journal_id, enabled) SELECT email_id, email_key, journal_id, enabled FROM email_templates_tmp;

to:
Code: Select all
INSERT INTO email_templates (email_key, journal_id, enabled) SELECT email_key, journal_id, enabled FROM email_templates_tmp;


I think that this is the best form to correct this bug.

Eduardo Ruthes

ps. forgive me the ones that had read this reply before, I erased to format better and to correct some things…
eruthes
 
Posts: 26
Joined: Mon Nov 21, 2005 9:33 am
Location: Curitiba, Paraná - Brasil

Postby vazquezm » Thu Jul 27, 2006 9:02 am

more problems,

now, when I try the manual update, instead of the code, I got this error from the database:
DB Error: ERROR: relation "rt_settings" does not exist.

So, I cannot get the code to modify and do the manual updating.

help!
vazquezm
 
Posts: 35
Joined: Mon Mar 13, 2006 7:35 am

Postby asmecher » Thu Jul 27, 2006 9:19 am

Hi Vazquezm,

If you backed up your database before starting the upgrade, the easiest way to continue is restoring that backup and following the instructions above. If not, please contact me at pkp-support@sfu.ca and I'll pick up the conversation from there.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Postby vazquezm » Thu Jul 27, 2006 10:27 am

hi Alec,

I have tried to restore the backup, but I got other error. Tomorow I will email you with the information.

Thank you.
vazquezm
 
Posts: 35
Joined: Mon Mar 13, 2006 7:35 am

Postgresql update problems

Postby eruthes » Fri Jul 28, 2006 11:43 am

Carefully looking at the result of data base update, I perceived that the modifications that I suggested do not decide all the problems.
All tables that are recreated have its sequences reseted . Then, another solution for Posthresql update that I see is to set all sequences before effecting new inclusions.

On manual update, include before that line (aprox at line 2093):
Code: Select all
INSERT INTO email_templates_default (email_key, can_edit, can_disable, to_role_id) VALUES ...


these code:

Code: Select all
SELECT pg_catalog.setval('users_user_id_seq', max(user_id)) FROM users;
SELECT pg_catalog.setval('auth_sources_auth_id_seq', max(auth_id)) FROM auth_sources;
SELECT pg_catalog.setval('journals_journal_id_seq', max(journal_id)) FROM journals;
SELECT pg_catalog.setval('sections_section_id_seq', max(section_id)) FROM sections;
SELECT pg_catalog.setval('issues_issue_id_seq', max(issue_id)) FROM issues;
SELECT pg_catalog.setval('articles_article_id_seq', max(article_id)) FROM articles;
SELECT pg_catalog.setval('published_articles_pub_id_seq', max(pub_id)) FROM published_articles;
SELECT pg_catalog.setval('comments_comment_id_seq', max(comment_id)) FROM comments;
SELECT pg_catalog.setval('article_authors_author_id_seq', max(author_id)) FROM article_authors;
SELECT pg_catalog.setval('article_files_file_id_seq', max(file_id)) FROM article_files;
SELECT pg_catalog.setval('article_supplementary_files_supp_id_seq', max(supp_id)) FROM article_supplementary_files;
SELECT pg_catalog.setval('article_notes_note_id_seq', max(note_id)) FROM article_notes;
SELECT pg_catalog.setval('edit_assignments_edit_id_seq', max(edit_id)) FROM edit_assignments;
SELECT pg_catalog.setval('edit_decisions_edit_decision_id_seq', max(edit_decision_id)) FROM edit_decisions;
SELECT pg_catalog.setval('review_assignments_review_id_seq', max(review_id)) FROM review_assignments;
SELECT pg_catalog.setval('copyed_assignments_copyed_id_seq', max(copyed_id)) FROM copyed_assignments;
SELECT pg_catalog.setval('layouted_assignments_layouted_id_seq', max(layouted_id)) FROM layouted_assignments;
SELECT pg_catalog.setval('article_galleys_galley_id_seq', max(galley_id)) FROM article_galleys;
SELECT pg_catalog.setval('proof_assignments_proof_id_seq', max(proof_id)) FROM proof_assignments;
SELECT pg_catalog.setval('article_event_log_log_id_seq', max(log_id)) FROM article_event_log;
SELECT pg_catalog.setval('article_email_log_log_id_seq', max(log_id)) FROM article_email_log;
SELECT pg_catalog.setval('article_comments_comment_id_seq', max(comment_id)) FROM article_comments;
SELECT pg_catalog.setval('email_templates_default_email_id_seq', max(email_id)) FROM email_templates_default;
SELECT pg_catalog.setval('email_templates_email_id_seq', max(email_id)) FROM email_templates;
SELECT pg_catalog.setval('article_search_keyword_list_keyword_id_seq', max(keyword_id)) FROM article_search_keyword_list;
SELECT pg_catalog.setval('article_search_objects_object_id_seq', max(object_id)) FROM article_search_objects;
SELECT pg_catalog.setval('rt_versions_version_id_seq', max(version_id)) FROM rt_versions;
SELECT pg_catalog.setval('rt_contexts_context_id_seq', max(context_id)) FROM rt_contexts;
SELECT pg_catalog.setval('rt_searches_search_id_seq', max(search_id)) FROM rt_searches;
SELECT pg_catalog.setval('subscription_types_type_id_seq', max(type_id)) FROM subscription_types;
SELECT pg_catalog.setval('subscriptions_subscription_id_seq', max(subscription_id)) FROM subscriptions;
SELECT pg_catalog.setval('currencies_currency_id_seq', max(currency_id)) FROM currencies;
SELECT pg_catalog.setval('temporary_files_file_id_seq', max(file_id)) FROM temporary_files;
SELECT pg_catalog.setval('access_keys_access_key_id_seq', max(access_key_id)) FROM access_keys;
SELECT pg_catalog.setval('groups_group_id_seq', max(group_id)) FROM groups;


That's all,
Eduardo Ruthes
eruthes
 
Posts: 26
Joined: Mon Nov 21, 2005 9:33 am
Location: Curitiba, Paraná - Brasil

Postby asmecher » Fri Jul 28, 2006 1:26 pm

Hi Eduardo,

Thanks for the notes. Object auto-creation is a tricky aspect of PostgreSQL that we'll need to look into for the next release of OJS. In the meantime, your notes should serve to help other users who are upgrading.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Postby vazquezm » Mon Jul 31, 2006 3:00 am

Dear Eduardo and Alec,

I am in a dead point.
I have tried to restore the database to do the manual updating, but I have got this message with errors:

C:\Archivos de programa\PostgreSQL\8.1\bin\pg_restore.exe -i -h localhost -p 5432 -U postgres -d cyta -v "C:\temp2\revistajulio.backup"
pg_restore: connecting to database for restore
pg_restore: creating SCHEMA public
pg_restore: creating COMMENT SCHEMA public
pg_restore: creating TABLE access_keys
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 1379; 1259 17891 TABLE access_keys postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "access_keys" already exists
Command was: CREATE TABLE access_keys (
access_key_id serial NOT NULL,
context character varying(40) NOT NULL,
key_hash chara...
pg_restore: executing SEQUENCE SET access_keys_access_key_id_seq
pg_restore: creating TABLE article_authors
pg_restore: [archiver (db)] Error from TOC entry 1322; 1259 17565 TABLE article_authors postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "article_authors" already exists
Command was: CREATE TABLE article_authors (
author_id serial NOT NULL,
article_id bigint NOT NULL,
first_name character varyi...
pg_restore: executing SEQUENCE SET article_authors_author_id_seq
pg_restore: creating TABLE article_comments
pg_restore: [archiver (db)] Error from TOC entry 1350; 1259 17720 TABLE article_comments postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "article_comments" already exists
Command was: CREATE TABLE article_comments (
comment_id serial NOT NULL,
comment_type bigint,
role_id bigint NOT NULL,
ar...
pg_restore: executing SEQUENCE SET article_comments_comment_id_seq
pg_restore: creating TABLE article_email_log
pg_restore: [archiver (db)] Error from TOC entry 1348; 1259 17709 TABLE article_email_log postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "article_email_log" already exists
Command was: CREATE TABLE article_email_log (
log_id serial NOT NULL,
article_id bigint NOT NULL,
sender_id bigint NOT NULL,
...
pg_restore: executing SEQUENCE SET article_email_log_log_id_seq
pg_restore: creating TABLE article_event_log
pg_restore: [archiver (db)] Error from TOC entry 1346; 1259 17698 TABLE article_event_log postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "article_event_log" already exists
Command was: CREATE TABLE article_event_log (
log_id serial NOT NULL,
article_id bigint NOT NULL,
user_id bigint NOT NULL,
...
pg_restore: executing SEQUENCE SET article_event_log_log_id_seq
pg_restore: creating TABLE article_files
pg_restore: [archiver (db)] Error from TOC entry 1324; 1259 17578 TABLE article_files postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "article_files" already exists
Command was: CREATE TABLE article_files (
file_id serial NOT NULL,
revision bigint NOT NULL,
article_id bigint NOT NULL,
...
pg_restore: executing SEQUENCE SET article_files_file_id_seq
pg_restore: creating TABLE article_galleys
pg_restore: [archiver (db)] Error from TOC entry 1341; 1259 17674 TABLE article_galleys postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "article_galleys" already exists
Command was: CREATE TABLE article_galleys (
galley_id serial NOT NULL,
article_id bigint NOT NULL,
file_id bigint NOT NULL,
...
pg_restore: executing SEQUENCE SET article_galleys_galley_id_seq
pg_restore: creating TABLE article_html_galley_images
pg_restore: [archiver (db)] Error from TOC entry 1342; 1259 17683 TABLE article_html_galley_images postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "article_html_galley_images" already exists
Command was: CREATE TABLE article_html_galley_images (
galley_id bigint NOT NULL,
file_id bigint NOT NULL
);
pg_restore: creating TABLE article_notes
pg_restore: [archiver (db)] Error from TOC entry 1328; 1259 17604 TABLE article_notes postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "article_notes" already exists
Command was: CREATE TABLE article_notes (
note_id serial NOT NULL,
article_id bigint NOT NULL,
user_id bigint NOT NULL,
d...
pg_restore: executing SEQUENCE SET article_notes_note_id_seq
pg_restore: creating TABLE article_search_keyword_list
pg_restore: [archiver (db)] Error from TOC entry 1358; 1259 17767 TABLE article_search_keyword_list postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "article_search_keyword_list" already exists
Command was: CREATE TABLE article_search_keyword_list (
keyword_id serial NOT NULL,
keyword_text character varying(60) NOT NULL
);
pg_restore: executing SEQUENCE SET article_search_keyword_list_keyword_id_seq
pg_restore: creating TABLE article_search_object_keywords
pg_restore: [archiver (db)] Error from TOC entry 1361; 1259 17780 TABLE article_search_object_keywords postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "article_search_object_keywords" already exists
Command was: CREATE TABLE article_search_object_keywords (
object_id bigint NOT NULL,
keyword_id bigint NOT NULL,
pos integer...
pg_restore: creating TABLE article_search_objects
pg_restore: [archiver (db)] Error from TOC entry 1360; 1259 17775 TABLE article_search_objects postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "article_search_objects" already exists
Command was: CREATE TABLE article_search_objects (
object_id serial NOT NULL,
article_id bigint NOT NULL,
"type" integer NOT ...
pg_restore: executing SEQUENCE SET article_search_objects_object_id_seq
pg_restore: creating TABLE article_supplementary_files
pg_restore: [archiver (db)] Error from TOC entry 1326; 1259 17589 TABLE article_supplementary_files postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "article_supplementary_files" already exists
Command was: CREATE TABLE article_supplementary_files (
supp_id serial NOT NULL,
file_id bigint NOT NULL,
article_id bigint N...
pg_restore: executing SEQUENCE SET article_supplementary_files_supp_id_seq
pg_restore: creating TABLE articles
pg_restore: [archiver (db)] Error from TOC entry 1316; 1259 17523 TABLE articles postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "articles" already exists
Command was: CREATE TABLE articles (
article_id serial NOT NULL,
user_id bigint NOT NULL,
journal_id bigint NOT NULL,
sec...
pg_restore: executing SEQUENCE SET articles_article_id_seq
pg_restore: creating TABLE auth_sources
pg_restore: [archiver (db)] Error from TOC entry 1301; 1259 17416 TABLE auth_sources postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "auth_sources" already exists
Command was: CREATE TABLE auth_sources (
auth_id serial NOT NULL,
title character varying(60) NOT NULL,
plugin character vary...
pg_restore: executing SEQUENCE SET auth_sources_auth_id_seq
pg_restore: creating TABLE comments
pg_restore: [archiver (db)] Error from TOC entry 1320; 1259 17553 TABLE comments postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "comments" already exists
Command was: CREATE TABLE comments (
comment_id serial NOT NULL,
article_id bigint NOT NULL,
parent_comment_id bigint,
nu...
pg_restore: executing SEQUENCE SET comments_comment_id_seq
pg_restore: creating TABLE copyed_assignments
pg_restore: [archiver (db)] Error from TOC entry 1337; 1259 17656 TABLE copyed_assignments postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "copyed_assignments" already exists
Command was: CREATE TABLE copyed_assignments (
copyed_id serial NOT NULL,
article_id bigint NOT NULL,
copyeditor_id bigint NO...
pg_restore: executing SEQUENCE SET copyed_assignments_copyed_id_seq
pg_restore: creating TABLE currencies
pg_restore: [archiver (db)] Error from TOC entry 1375; 1259 17875 TABLE currencies postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "currencies" already exists
Command was: CREATE TABLE currencies (
currency_id serial NOT NULL,
name character varying(60) NOT NULL,
code_alpha character...
pg_restore: executing SEQUENCE SET currencies_currency_id_seq
pg_restore: creating TABLE custom_section_orders
pg_restore: [archiver (db)] Error from TOC entry 1314; 1259 17516 TABLE custom_section_orders postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "custom_section_orders" already exists
Command was: CREATE TABLE custom_section_orders (
issue_id bigint NOT NULL,
section_id bigint NOT NULL,
seq double precision ...
pg_restore: creating TABLE edit_assignments
pg_restore: [archiver (db)] Error from TOC entry 1330; 1259 17617 TABLE edit_assignments postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "edit_assignments" already exists
Command was: CREATE TABLE edit_assignments (
edit_id serial NOT NULL,
article_id bigint NOT NULL,
editor_id bigint NOT NULL,
...
pg_restore: executing SEQUENCE SET edit_assignments_edit_id_seq
pg_restore: creating TABLE edit_decisions
pg_restore: [archiver (db)] Error from TOC entry 1332; 1259 17628 TABLE edit_decisions postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "edit_decisions" already exists
Command was: CREATE TABLE edit_decisions (
edit_decision_id serial NOT NULL,
article_id bigint NOT NULL,
round smallint NOT N...
pg_restore: executing SEQUENCE SET edit_decisions_edit_decision_id_seq
pg_restore: creating TABLE email_templates
pg_restore: [archiver (db)] Error from TOC entry 1355; 1259 17749 TABLE email_templates postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "email_templates" already exists
Command was: CREATE TABLE email_templates (
email_id serial NOT NULL,
email_key character varying(30) NOT NULL,
journal_id bi...
pg_restore: creating TABLE email_templates_data
pg_restore: [archiver (db)] Error from TOC entry 1356; 1259 17757 TABLE email_templates_data postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "email_templates_data" already exists
Command was: CREATE TABLE email_templates_data (
email_key character varying(30) NOT NULL,
locale character varying(5) DEFAULT 'e...
pg_restore: creating TABLE email_templates_default
pg_restore: [archiver (db)] Error from TOC entry 1352; 1259 17731 TABLE email_templates_default postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "email_templates_default" already exists
Command was: CREATE TABLE email_templates_default (
email_id serial NOT NULL,
email_key character varying(30) NOT NULL,
can_d...
pg_restore: creating TABLE email_templates_default_data
pg_restore: [archiver (db)] Error from TOC entry 1353; 1259 17739 TABLE email_templates_default_data postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "email_templates_default_data" already exists
Command was: CREATE TABLE email_templates_default_data (
email_key character varying(30) NOT NULL,
locale character varying(5) DE...
pg_restore: executing SEQUENCE SET email_templates_default_email_id_seq
pg_restore: executing SEQUENCE SET email_templates_email_id_seq
pg_restore: creating TABLE group_memberships
pg_restore: [archiver (db)] Error from TOC entry 1382; 1259 17910 TABLE group_memberships postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "group_memberships" already exists
Command was: CREATE TABLE group_memberships (
user_id bigint NOT NULL,
group_id bigint NOT NULL,
about_displayed smallint DEF...
pg_restore: creating TABLE groups
pg_restore: [archiver (db)] Error from TOC entry 1381; 1259 17899 TABLE groups postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "groups" already exists
Command was: CREATE TABLE groups (
group_id serial NOT NULL,
journal_id bigint NOT NULL,
title character varying(255) NOT NUL...
pg_restore: executing SEQUENCE SET groups_group_id_seq
pg_restore: creating TABLE issues
pg_restore: [archiver (db)] Error from TOC entry 1313; 1259 17501 TABLE issues postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "issues" already exists
Command was: CREATE TABLE issues (
issue_id serial NOT NULL,
journal_id bigint NOT NULL,
title character varying(120),
vo...
pg_restore: executing SEQUENCE SET issues_issue_id_seq
pg_restore: creating TABLE journal_settings
pg_restore: [archiver (db)] Error from TOC entry 1305; 1259 17449 TABLE journal_settings postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "journal_settings" already exists
Command was: CREATE TABLE journal_settings (
journal_id bigint NOT NULL,
setting_name character varying(255) NOT NULL,
settin...
pg_restore: creating TABLE journals
pg_restore: [archiver (db)] Error from TOC entry 1304; 1259 17438 TABLE journals postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "journals" already exists
Command was: CREATE TABLE journals (
journal_id serial NOT NULL,
title character varying(255) NOT NULL,
description text,
...
pg_restore: executing SEQUENCE SET journals_journal_id_seq
pg_restore: creating TABLE layouted_assignments
pg_restore: [archiver (db)] Error from TOC entry 1339; 1259 17665 TABLE layouted_assignments postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "layouted_assignments" already exists
Command was: CREATE TABLE layouted_assignments (
layouted_id serial NOT NULL,
article_id bigint NOT NULL,
editor_id bigint NO...
pg_restore: executing SEQUENCE SET layouted_assignments_layouted_id_seq
pg_restore: creating TABLE notification_status
pg_restore: [archiver (db)] Error from TOC entry 1308; 1259 17472 TABLE notification_status postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "notification_status" already exists
Command was: CREATE TABLE notification_status (
journal_id bigint NOT NULL,
user_id bigint NOT NULL
);
pg_restore: creating TABLE oai_resumption_tokens
pg_restore: [archiver (db)] Error from TOC entry 1362; 1259 17785 TABLE oai_resumption_tokens postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "oai_resumption_tokens" already exists
Command was: CREATE TABLE oai_resumption_tokens (
token character varying(32) NOT NULL,
expire bigint NOT NULL,
record_offset...
pg_restore: creating TABLE plugin_settings
pg_restore: [archiver (db)] Error from TOC entry 1306; 1259 17457 TABLE plugin_settings postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "plugin_settings" already exists
Command was: CREATE TABLE plugin_settings (
plugin_name character varying(80) NOT NULL,
journal_id bigint NOT NULL,
setting_n...
pg_restore: creating TABLE proof_assignments
pg_restore: [archiver (db)] Error from TOC entry 1344; 1259 17689 TABLE proof_assignments postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "proof_assignments" already exists
Command was: CREATE TABLE proof_assignments (
proof_id serial NOT NULL,
article_id bigint NOT NULL,
proofreader_id bigint NOT...
pg_restore: executing SEQUENCE SET proof_assignments_proof_id_seq
pg_restore: creating TABLE published_articles
pg_restore: [archiver (db)] Error from TOC entry 1318; 1259 17540 TABLE published_articles postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "published_articles" already exists
Command was: CREATE TABLE published_articles (
pub_id serial NOT NULL,
article_id bigint NOT NULL,
issue_id bigint NOT NULL,
...
pg_restore: executing SEQUENCE SET published_articles_pub_id_seq
pg_restore: creating TABLE review_assignments
pg_restore: [archiver (db)] Error from TOC entry 1335; 1259 17642 TABLE review_assignments postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "review_assignments" already exists
Command was: CREATE TABLE review_assignments (
review_id serial NOT NULL,
article_id bigint NOT NULL,
reviewer_id bigint NOT ...
pg_restore: executing SEQUENCE SET review_assignments_review_id_seq
pg_restore: creating TABLE review_rounds
pg_restore: [archiver (db)] Error from TOC entry 1333; 1259 17635 TABLE review_rounds postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "review_rounds" already exists
Command was: CREATE TABLE review_rounds (
article_id bigint NOT NULL,
round smallint NOT NULL,
review_revision bigint
);
pg_restore: creating TABLE roles
pg_restore: [archiver (db)] Error from TOC entry 1307; 1259 17465 TABLE roles postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "roles" already exists
Command was: CREATE TABLE roles (
journal_id bigint NOT NULL,
user_id bigint NOT NULL,
role_id bigint NOT NULL
);
pg_restore: creating TABLE rt_contexts
pg_restore: [archiver (db)] Error from TOC entry 1367; 1259 17821 TABLE rt_contexts postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "rt_contexts" already exists
Command was: CREATE TABLE rt_contexts (
context_id serial NOT NULL,
version_id bigint NOT NULL,
title character varying(120) ...
pg_restore: executing SEQUENCE SET rt_contexts_context_id_seq
pg_restore: creating TABLE rt_searches
pg_restore: [archiver (db)] Error from TOC entry 1369; 1259 17837 TABLE rt_searches postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "rt_searches" already exists
Command was: CREATE TABLE rt_searches (
search_id serial NOT NULL,
context_id bigint NOT NULL,
title character varying(120) N...
pg_restore: executing SEQUENCE SET rt_searches_search_id_seq
pg_restore: creating TABLE rt_settings
pg_restore: [archiver (db)] Error from TOC entry 1363; 1259 17792 TABLE rt_settings postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "rt_settings" already exists
Command was: CREATE TABLE rt_settings (
journal_id bigint NOT NULL,
version_id bigint,
capture_cite smallint DEFAULT 0 NOT NU...
pg_restore: creating TABLE rt_versions
pg_restore: [archiver (db)] Error from TOC entry 1365; 1259 17808 TABLE rt_versions postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "rt_versions" already exists
Command was: CREATE TABLE rt_versions (
version_id serial NOT NULL,
journal_id bigint NOT NULL,
version_key character varying...
pg_restore: executing SEQUENCE SET rt_versions_version_id_seq
pg_restore: creating TABLE scheduled_tasks
pg_restore: [archiver (db)] Error from TOC entry 1297; 1259 17397 TABLE scheduled_tasks postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "scheduled_tasks" already exists
Command was: CREATE TABLE scheduled_tasks (
class_name character varying(255) NOT NULL,
last_run timestamp without time zone NOT ...
pg_restore: creating TABLE section_editors
pg_restore: [archiver (db)] Error from TOC entry 1311; 1259 17492 TABLE section_editors postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "section_editors" already exists
Command was: CREATE TABLE section_editors (
journal_id bigint NOT NULL,
section_id bigint NOT NULL,
user_id bigint NOT NULL
);
pg_restore: creating TABLE sections
pg_restore: [archiver (db)] Error from TOC entry 1310; 1259 17478 TABLE sections postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "sections" already exists
Command was: CREATE TABLE sections (
section_id serial NOT NULL,
journal_id bigint NOT NULL,
title character varying(120) NOT...
pg_restore: executing SEQUENCE SET sections_section_id_seq
pg_restore: creating TABLE sessions
pg_restore: [archiver (db)] Error from TOC entry 1302; 1259 17425 TABLE sessions postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "sessions" already exists
Command was: CREATE TABLE sessions (
session_id character varying(32) NOT NULL,
user_id bigint,
ip_address character varying(...
pg_restore: creating TABLE site
pg_restore: [archiver (db)] Error from TOC entry 1296; 1259 17384 TABLE site postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "site" already exists
Command was: CREATE TABLE site (
title character varying(120) DEFAULT 'Open Journal Systems'::character varying NOT NULL,
intro t...
pg_restore: creating TABLE subscription_types
pg_restore: [archiver (db)] Error from TOC entry 1371; 1259 17849 TABLE subscription_types postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "subscription_types" already exists
Command was: CREATE TABLE subscription_types (
type_id serial NOT NULL,
journal_id bigint NOT NULL,
type_name character varyi...
pg_restore: executing SEQUENCE SET subscription_types_type_id_seq
pg_restore: creating TABLE subscriptions
pg_restore: [archiver (db)] Error from TOC entry 1373; 1259 17862 TABLE subscriptions postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "subscriptions" already exists
Command was: CREATE TABLE subscriptions (
subscription_id serial NOT NULL,
journal_id bigint NOT NULL,
user_id bigint NOT NUL...
pg_restore: executing SEQUENCE SET subscriptions_subscription_id_seq
pg_restore: creating TABLE temporary_files
pg_restore: [archiver (db)] Error from TOC entry 1377; 1259 17883 TABLE temporary_files postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "temporary_files" already exists
Command was: CREATE TABLE temporary_files (
file_id serial NOT NULL,
user_id bigint NOT NULL,
file_name character varying(90)...
pg_restore: executing SEQUENCE SET temporary_files_file_id_seq
pg_restore: creating TABLE users
pg_restore: [archiver (db)] Error from TOC entry 1299; 1259 17403 TABLE users postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "users" already exists
Command was: CREATE TABLE users (
user_id serial NOT NULL,
username character varying(32) NOT NULL,
"password" character vary...
pg_restore: executing SEQUENCE SET users_user_id_seq
pg_restore: creating TABLE versions
pg_restore: [archiver (db)] Error from TOC entry 1295; 1259 17375 TABLE versions postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "versions" already exists
Command was: CREATE TABLE versions (
major integer DEFAULT 0 NOT NULL,
minor integer DEFAULT 0 NOT NULL,
revision integer DEF...
pg_restore: restoring data for table "access_keys"
pg_restore: restoring data for table "article_authors"
pg_restore: restoring data for table "article_comments"
pg_restore: restoring data for table "article_email_log"
pg_restore: restoring data for table "article_event_log"
pg_restore: restoring data for table "article_files"
pg_restore: restoring data for table "article_galleys"
pg_restore: restoring data for table "article_html_galley_images"
pg_restore: restoring data for table "article_notes"
pg_restore: restoring data for table "article_search_keyword_list"
pg_restore: restoring data for table "article_search_object_keywords"
pg_restore: restoring data for table "article_search_objects"
pg_restore: restoring data for table "article_supplementary_files"
pg_restore: restoring data for table "articles"
pg_restore: restoring data for table "auth_sources"
pg_restore: restoring data for table "comments"
pg_restore: restoring data for table "copyed_assignments"
pg_restore: restoring data for table "currencies"
pg_restore: ERROR: duplicate key violates unique constraint "currencies_pkey"
CONTEXT: COPY currencies, line 1: "1 Afghani AFN 971"
pg_restore: [archiver (db)] error returned by PQendcopy: ERROR: duplicate key violates unique constraint "currencies_pkey"
CONTEXT: COPY currencies, line 1: "1 Afghani AFN 971"
pg_restore: *** aborted because of error

El proceso retornó el código de salida 1.


I am not an expert manipulating Postgresql. If someone can help, I will be very grateful. Maybe, I can send the backup file (112 Kb) by email (to Eduardo?), so you can modify the file and send me the amended file. It seems that Eduardo is the expert in PostgreSql.

Thank you
Manuel
vazquezm
 
Posts: 35
Joined: Mon Mar 13, 2006 7:35 am

Postby eruthes » Mon Jul 31, 2006 6:15 am

Hahaha!
Grateful for the compliment, but I'm not expert in postgresql (and nor in English if you perceived). I'm only a user who works with postgresql and needs to decide its problems. But I can try to help.

Consideration with respect to the restoration:

Are you traying to restore an existent database? Before restore a database I generally drop it and recreate it... I know that's not the most elegant form, but it works to me.

I generally create dump with pg_dump and restore it directly on command line with “psql - U [to user] [database] < [restore_file]” or from inside data base in command line "\i [file]". I never used pg_restore…

Eduardo Ruthes
eruthes
 
Posts: 26
Joined: Mon Nov 21, 2005 9:33 am
Location: Curitiba, Paraná - Brasil

Postby vazquezm » Tue Aug 01, 2006 3:06 am

Dear All,

I have follow the method of the brute force.
I have install OJS in a different directory and with a differen database (MySql). The new installation working OK and I have alive the old one to move the data manually.
I have imported the users Ok.
However, I have problems to import the issues, to create new submissions, or to edit metadata.
Always I have got a error like this:
DB Error: Duplicate entry 'ra' for key 2


Any suggestions?.
vazquezm
 
Posts: 35
Joined: Mon Mar 13, 2006 7:35 am

Postby asmecher » Tue Aug 01, 2006 9:39 am

Hi Vazquezm,

Try running tools/rebuildSearchIndex.php from the command line; if you receive the error message when you run this tool, the problem is most likely due to database support for special characters. I can provide a patch for you to try.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Postby vazquezm » Wed Aug 02, 2006 1:40 am

Hi Alec,

I have run tools/rebuildSearchIndex.php and I have got a similar error:

Indexing "Ciencia y Tecnologia Alimentaria" .... <h1> DB Error: Duplicate entry ´prebi´for key 2 </h1>

what follows?
vazquezm
 
Posts: 35
Joined: Mon Mar 13, 2006 7:35 am

Postby asmecher » Wed Aug 02, 2006 10:51 am

Hi Vazquezm,

Try applying the following patches:
These patches address the situation where the database server is confused by special characters (e.g. invalid characters, older DBMSs, or a mismatch between character set configurations).

Run tools/rebuildSearchIndex.php again and see what happens. This should correct the problem.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Postby vazquezm » Wed Aug 02, 2006 2:08 pm

Hi Alec,

I am going to show you my inexperience with php. To apply these patches, I need to do the changes manually, or I can use any tool to make the changes automatically?.

thanks.
vazquezm
 
Posts: 35
Joined: Mon Mar 13, 2006 7:35 am

Postby asmecher » Wed Aug 02, 2006 4:08 pm

Hi Vazquezm,

On the command line, from the OJS directory (i.e. the one containing index.php), run the following:
Code: Select all
patch -p1 < patch_filename_here.diff
...for each of the three patch files.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Next

Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 2 guests