Failed when update database

The following updates returned messages

dblog module

Update #7001
Failed: DatabaseSchemaObjectExistsException: Cannot add index <em class="placeholder">uid</em> to table <em class="placeholder">watchdog</em>: index already exists. in DatabaseSchema_pgsql->addIndex() (line 481 of /home/drupal-7.4/includes/database/pgsql/schema.inc).

Comments

catch’s picture

Version: 7.4 » 7.x-dev
Issue tags: +D7 upgrade path

That index did not exist in Drupal 6 dblog module. Is it possible you added the index yourself at some point?

marcingy’s picture

Status: Active » Postponed (maintainer needs more info)
wa2nlinux’s picture

No I did'nt add anything ..
I Use postgresql 8.3

ausimpson’s picture

Title: Failed upgrade from 6.22 to 7.4 (dblog.module) » Failed update from 6.22 to 7.4
Version: 7.x-dev » 7.4
Component: dblog.module » update.module
Status: Postponed (maintainer needs more info) » Needs work

Experienced similar error during three attempts to update 6.22 to 7.4 despite rigorous adhesion to documentation instructions:

DatabaseSchemaObjectExistsException: Tablerole_permission already exists in DatabaseSchema->createTable() (line 629 of /home/plwaorg/public_html/includes/database/schema.inc).

Am considering starting a 7.4 site and reloading 4.5GB of data!
Has anyone any better ideas before I surrender?

marcingy’s picture

Version: 7.4 » 7.x-dev
Status: Needs work » Active
marcingy’s picture

Component: update.module » base system
Status: Active » Postponed (maintainer needs more info)

And postponed again we need more info about your environment etc.

gallen’s picture

Status: Postponed (maintainer needs more info) » Needs work

Converting from 6.25 to 7.12 (postgresql 8.3)
Procedure creates index but terminates on subsequent "invalid input syntax for type bytea". Subsequent runs of update.php tries to recreate index with above error.

To get around this problem, I needed to run from command prompt:

ALTER TABLE watchdog ALTER variables TYPE bytea USING convert_to(variables,'UTF8')::bytea;
drop index watchdog_uid_idx;

xjm’s picture

Status: Needs work » Postponed (maintainer needs more info)

Regarding #7, that's a completely different issue than the other issues mentioned here, and sounds to me to be a database-specific issue. I'd suggest looking at these issues and seeing if one sounds like the issue you encountered:
http://drupal.org/project/issues/search/drupal?text=bytea&version%5B%5D=...

neRok’s picture

Component: base system » database update system
Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Im going over some postponed core bugs.

There have been 3 different errors posted, and no steps to reproduce any, so I think we can close this one.

IMO, comment #1 also makes a good suggestion to the cause of the original issue.