Yes, I repeated everything from the beginning and all worked fine. Best regards Evgeni
On Tuesday, February 6, 2018 at 11:59:17 PM UTC+2, Tim Donohue wrote: > > Hi Evgeni, > > Yes, that section of the documentation is actually asking you to run the > v5.6 "update-sequences.sql" against your 5.6-compatible database before > upgrading it. It's not required, but sometimes if your database sequences > get out of "sync", then the database upgrade could fail. > > Obviously, as the database changes in new releases, sometimes the > "update-sequences.sql" script needs to also change. So, the issue here > seems to be that you ran the v6.2 "update-sequences.sql" against a 5.6 > compatible database, and there are changes in the v6.2 > "update-sequences.sql" that are not compatible with 5.6. > > Hopefully that makes more sense, > > Tim > > > On Tue, Feb 6, 2018 at 2:46 PM Evgeni Dimitrov <[email protected] > <javascript:>> wrote: > >> Thank you Tim, >> >> I followed the "Upgrade steps": >> "In some scenarios, if your database's "sequences" are outdated, >> inconsistent or incorrect, a >> database migration error may occur (in your DSpace logs). In order to >> AVOID this scenario, you >> may wish to manually run the "update-sequences.sql" script PRIOR to >> upgrade." >> >> So, I did run "update-sequences.sql" AFTER setting 6.2 in [dspace-source] >> and running mvn and ant, but BEFORE the DB migration... >> >> Or may be this "PRIOR to upgrade" means to run the "update-sequences.sql" >> script of the 5.6 version before even starting the upgrade to 6.2? >> >> Best regards >> Evgeni >> >> >> On Tuesday, February 6, 2018 at 7:13:39 PM UTC+2, Tim Donohue wrote: >> >>> Hi Evgeni, >>> >>> It sounds to me like your DSpace 6.2 upgrade didn't fully succeed *OR* >>> you haven't yet run all the database migrations. You might want to check >>> your DSpace logs (dspace.log) and/or the output of "[dspace]/bin/dspace >>> database status". If migrations are listed as PENDING, that means they >>> haven't yet been run, and your database is not fully upgraded yet. You can >>> manually run "./dspace database migrate" to run all Pending migrations (and >>> you should then watch the dspace.log file to see that they successfully are >>> applied). >>> >>> 1) The "handle_id_seq" is created in one of the migrations that upgrade >>> your database to 6.x. Specifically, this migration: >>> https://github.com/DSpace/DSpace/blob/dspace-6_x/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V6.0_2016.07.26__DS-3277_fix_handle_assignment.sql#L15 >>> >>> So, it sounds to me like this migration did not run yet, or failed in some >>> way. Once this migration runs, the "update-sequences.sql" should work >>> again. >>> >>> 2) The registry updates should be triggered automatically (and you >>> should find them noted in your dspace.log file, if they were executed). >>> The database migrations and registry updates both should appear in your >>> dspace.log file. If you have concerns though, you *can* manually run those >>> registry updates. Manually running them won't hurt anything, as it simply >>> checks if all the registry entries already exist...if they already do exist >>> in your database, then no changes will be made. >>> >>> In general, during a DSpace upgrade, you should keep a close eye on the >>> DSpace log files. That's where you'll see more information on whether a >>> migration failed, which migrations succeeded, and whether or not your >>> registry updates automatically. >>> >>> Good luck, >>> >>> Tim >>> >>> On Tue, Feb 6, 2018 at 9:12 AM Evgeni Dimitrov <[email protected]> >>> wrote: >>> >> I updated a small test repository from 5.6 to 6.2. Quite smoothly and all >>>> works in the end, but two questions appeared: >>>> >>>> 1. Running update-sequences.sql there was an error message: >>>> >>>> psql -U dspace -f >>>> D:\DSPACE.5.6.n\DSPACE\etc\postgres\update-sequences.sql dspace56n >>>> >>>> ... >>>> >>>> setval >>>> -------- >>>> (1 row) >>>> >>>> psql:D:/DSPACE.5.6.n/DSPACE/etc/postgres/update-sequences.sql:63: >>>> ERROR: relation "handle_id_seq" does not exist >>>> LINE 1: SELECT setval('handle_id_seq', max(handle_id)) FROM handle; >>>> ^ >>>> setval >>>> -------- >>>> 42 >>>> (1 row) >>>> >>>> Is this an error in the script or an error in the database? Is not >>>> update-sequences.sql supposed to fix errors, not to report errors? >>>> >>>> 2. In the "Upgrade Steps" there is "The database migration should also >>>> trigger your metadata/file registries to be automatically updated (based >>>> on >>>> the config files in [dspace]/config/registries/). However, if this update >>>> was NOT triggered, you can also manually run these registry updates (they >>>> will not harm existing registry contents)." >>>> >>>> How can I know was the update of "metadata/file registries" triggered >>>> or not? What does registry-loader do? What if I run >>>> >>>> [dspace]/bin/dspace registry-loader -metadata >>>> [dspace]/config/registries/dcterms-types.xml >>>> >>>> without knowing was the update already triggered or not? >>>> >>>> Best regards >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "DSpace Technical Support" group. >>>> >>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>> >>> >>>> Visit this group at https://groups.google.com/group/dspace-tech. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- >>> Tim Donohue >>> Technical Lead for DSpace & DSpaceDirect >>> DuraSpace.org | DSpace.org | DSpaceDirect.org >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "DSpace Technical Support" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at https://groups.google.com/group/dspace-tech. >> For more options, visit https://groups.google.com/d/optout. >> > -- > Tim Donohue > Technical Lead for DSpace & DSpaceDirect > DuraSpace.org | DSpace.org | DSpaceDirect.org > -- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/dspace-tech. For more options, visit https://groups.google.com/d/optout.
