This is the bug tracker for Photo Organizer.
FS#311 - fresh install hangs on sql/db error
Attached to Project:
Photo Organizer
Opened by Jürgen Kleff (juergen) - Monday, 26 November 2007, 17:26 GMT
Last edited by Solomon Peachy (pizza) - Tuesday, 27 November 2007, 17:30 GMT
Opened by Jürgen Kleff (juergen) - Monday, 26 November 2007, 17:26 GMT
Last edited by Solomon Peachy (pizza) - Tuesday, 27 November 2007, 17:30 GMT
|
DetailsHi, I was doing a new install 2.34b from scratch on a OpenSuse 10.0. Following the install guide, then calling po/install.php. Result:
[...] Upgrading from Photo Organizer version 2.33 * Upgrading database structure...OK * Upgrading database data... -- FAILED: update folder set date_changed = (select max(date_of_creation) from folder f2 where f2.parent_folder = folder.identifier) where date_changed is null FAILED * FEHLER: could not open relation with OID 23434 CONTEXT: SQL-Anweisung »SELECT 1 FROM ONLY "public"."users" x WHERE "identifier" = $1 FOR UPDATE OF x« No idea what that could be... |
This task depends upon
Closed by Solomon Peachy (pizza)
Tuesday, 27 November 2007, 17:30 GMT
Reason for closing: Fixed
Additional comments about closing: svn r1781, both -devel and -stable.
Tuesday, 27 November 2007, 17:30 GMT
Reason for closing: Fixed
Additional comments about closing: svn r1781, both -devel and -stable.
What postgresql version are you running?
ah, and I had to create the po_user with createuser -A, for this version had no '-S -R' flags...!?
First, I'm assuming you've tried to drop and recreate the datebase? It still errors out?
If you still have the broken database, what does this give you?
select * from pg_class where oid = 23434; -- or whatever the actual OID from the error was..
I don't have access to a PG8.0 box at the moment, but The po-devel demo site was running on PG8.0 for a while, so I'm not sure were this problem would have come from.
po_db=# select * from pg_class where oid = 23434;
relname | relnamespace | reltype | relowner | relam | relfilenode | reltablespace | relpages | reltuples | reltoastrelid | reltoastidxid | relhasindex | relisshared | relkind | relnatts | relchecks | reltriggers | relukeys | relfkeys | relrefs | relhasoids | relhaspkey | relhasrules | relhassubclass | relacl
-----------+--------------+---------+----------+-------+-------------+---------------+----------+-----------+---------------+---------------+-------------+-------------+---------+----------+-----------+-------------+----------+----------+---------+------------+------------+-------------+----------------+--------
users_idx | 2200 | 0 | 100 | 403 | 23434 | 0 | 1 | 0 | 0 | 0 | f | f | i | 1 | 0 | 0 | 0 | 0 | 0 | f | f | f | f |
(1 Zeile)
Current Photo Organizer DB version: 2.33
Upgrading from Photo Organizer version 2.33
* Upgrading database structure...OK
* Upgrading database data...
-- FAILED: update album set date_changed = (select max(date_changed) from photo, album_content where album_content.album = album.identifier and album_content.photo = photo.identifier)
FAILED
*
FEHLER: could not open relation with OID 23434
CONTEXT: SQL-Anweisung »SELECT 1 FROM ONLY "public"."users" x WHERE "identifier" = $1 FOR UPDATE OF x«
so now it's update album, not update folders anymore where's the error...
ok, I'll do another fresh install... I'll be back.
I'm beginning to suspect the error message is misleading. the users table (and its indices) has no bearing on the query that's supposedly failing.
If you run the failed query directly:
update folder set date_changed = (select max(date_of_creation) from folder f2 where f2.parent_folder = folder.identifier) where date_changed is null;
What happends?
And for sanity's sake, what does this return:
\dt files
po_db=# select * from pg_class where oid = 26659;
relname | relnamespace | reltype | relowner | relam | relfilenode | reltablespace | relpages | reltuples | reltoastrelid | reltoastidxid | relhasindex | relisshared | relkind | relnatts | relchecks | reltriggers | relukeys | relfkeys | relrefs | relhasoids | relhaspkey | relhasrules | relhassubclass | relacl
-----------+--------------+---------+----------+-------+-------------+---------------+----------+-----------+---------------+---------------+-------------+-------------+---------+----------+-----------+-------------+----------+----------+---------+------------+------------+-------------+----------------+--------
users_idx | 2200 | 0 | 100 | 403 | 26659 | 0 | 1 | 0 | 0 | 0 | f | f | i | 1 | 0 | 0 | 0 | 0 | 0 | f | f | f | f |
(1 Zeile)
\dt files says no matching relation found (something like that, my postgresql is speaking german ;-))
If your re-test fails, try modifiying src/sql/po.db.2.33.to.2.34.sql, adding '-- ' before the 'drop index users_idx;' on line 376. Add 'drop index users_idx;' at the end of src/sql/po.data.2.33.to.2.34.sql -- this should silence that error.
I appreciated it a lot when I noticed that the installer would do even automatic upgrades for me (if I had a running po before). Just wondered why it had a problem witha fresh install :-)
Anyway, thank you for your great work and your help. Maybe if I go deeper into the code by the time, I could give soem help back.
I'll make those changes to the svn tree and a 2.34c release will probably follow shortly.