[OPEN-ILS-DEV] Evergreen 2.2.0-2.2.1 Upgrade Script - Actions Already Logged in config.upgrade_log

Elliot Voris evoris at slcconline.edu
Wed Apr 17 19:50:07 EDT 2013


Hey, All

I'm working on upgrading my (currently 2.1.1 in production) Evergreen server up to the latest version 2.3.5, as of this morning when I started. I'm having a bit of trouble with one of the version-upgrade scripts (Open-ILS/src/sql/Pg/version-upgrade/2.2.0-2.2.1-upgrade-db.sql). All the previous scripts worked (2.1.1-2.1.2, 2.1.2-2.1.3, 2.1-2.2) without anything of concern. When I try to run this script, I get the following output:

postgres at evergreen-test:~/scripts/version-upgrade$
postgres at evergreen-test:~/scripts/version-upgrade$ psql -U evergreen -h localhost -f ./2.2.0-2.2.1-upgrade-db.sql old_evergreen
Password for user evergreen:
BEGIN
INSERT 0 1
psql:./2.2.0-2.2.1-upgrade-db.sql:10: ERROR:  duplicate key value violates unique constraint "upgrade_log_pkey"
DETAIL:  Key (version)=(0722) already exists.
CONTEXT:  SQL statement "INSERT INTO config.upgrade_log (version, applied_to) VALUES (my_db_patch, my_applied_to)"
PL/pgSQL function "upgrade_deps_block_check" line 17 at SQL statement
psql:./2.2.0-2.2.1-upgrade-db.sql:13: ERROR:  current transaction is aborted, commands ignored until end of transaction block
psql:./2.2.0-2.2.1-upgrade-db.sql:20: ERROR:  current transaction is aborted, commands ignored until end of transaction block
psql:./2.2.0-2.2.1-upgrade-db.sql:58: ERROR:  current transaction is aborted, commands ignored until end of transaction block
psql:./2.2.0-2.2.1-upgrade-db.sql:61: ERROR:  current transaction is aborted, commands ignored until end of transaction block
psql:./2.2.0-2.2.1-upgrade-db.sql:161: ERROR:  current transaction is aborted, commands ignored until end of transaction block
psql:./2.2.0-2.2.1-upgrade-db.sql:164: ERROR:  current transaction is aborted, commands ignored until end of transaction block
psql:./2.2.0-2.2.1-upgrade-db.sql:264: ERROR:  current transaction is aborted, commands ignored until end of transaction block
psql:./2.2.0-2.2.1-upgrade-db.sql:267: ERROR:  current transaction is aborted, commands ignored until end of transaction block
psql:./2.2.0-2.2.1-upgrade-db.sql:365: ERROR:  current transaction is aborted, commands ignored until end of transaction block
ROLLBACK
postgres at evergreen-test:~/scripts/version-upgrade$

I looked into it, and sure enough 0722 already does exist in config.upgrade_log. It is not the most recent entry in that table, and it was "applied_to" NULL. As I'm looking through the rest of the script, It looks as though upgrade operations 0725 and 0726 would likely throw the same error.

What can I do to resolve the trouble with this particular script? My intention is to run through every one of the version-upgrade scripts between 2.1.1 and 2.3.5 (2.3.6 afterwards, as well), is that not the correct way to go about it?

Thanks!

Elliot J. Voris
IT Director
St. Louis Christian College

evoris at slcconline.edu<mailto:evoris at slcconline.edu>
elliot at voris.me<mailto:elliot at voris.me>
314.837.6777 x1250

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20130417/8ce579e7/attachment.htm>


More information about the Open-ils-dev mailing list