15:00.28 | *** join/#fudforum naudefj (~quassel@dsl-240-219-76.telkomadsl.co.za) |
15:00.28 | *** mode/#fudforum [+o naudefj] by ChanServ |
15:12.35 | *** join/#fudforum ginguar (~cath@nat/yahoo/x-uomtrrsfgztklnnw) |
15:13.59 | ginguar | hello |
15:14.58 | ginguar | anyone around to help me install the nice new functionality naudefj wrote for me |
15:16.15 | naudefj | You need to install or upgrade to FUDforum 3.0.2RC2 to see it. |
15:23.01 | ginguar | the moderate userr thing you wrote for me? |
15:24.16 | ginguar | i'm currently on 3.0.1 |
15:33.20 | naudefj | Yes, it's included in 3.0.2RC2. |
15:33.46 | ginguar | cool, is RC2 stable? |
15:33.58 | ginguar | it's going on a live but not critical site |
15:34.37 | naudefj | I'm running 3.0.2RC2 on all my production sites. |
15:34.44 | ginguar | <PROTECTED> |
15:47.31 | ginguar | hi when trying to upgrade i got |
15:47.33 | ginguar | Warning: pg_query() [function.pg-query]: Query failed: ERROR: could not create unique index "fud30_index_pkey" DETAIL: Table contains duplicated values. in /mounts/sg400/home/rocforum/FUDforum/sql/pgsql/db.inc on line 93 |
15:47.33 | ginguar | Fatal error: Uncaught exception 'Exception' with message ': ERROR: could not create unique index "fud30_index_pkey" DETAIL: Table contains duplicated values. @ ALTER TABLE fud30_index ADD PRIMARY KEY (word_id,msg_id)' in /mounts/sg400/home/rocforum/www/upgrade.php:94 Stack trace: #0 /mounts/sg400/home/rocforum/FUDforum/sql/pgsql/db.inc(93): fud_sql_error_handler('ALTER TABLE fud...', 'ERROR: could n...', '', 'PostgreSQL 8.4....') #1 |
15:47.33 | ginguar | /mounts/sg400/home/rocforum/FUDforum/include/dbadmin.inc(243): q('ALTER TABLE fud...') #2 /mounts/sg400/home/rocforum/www/upgrade.php(909): create_primary_key('fud30_index', 'word_id,msg_id') #3 {main} thrown in /mounts/sg400/home/rocforum/www/upgrade.php on line 94 |
15:47.49 | ginguar | i'm using postgres |
16:10.34 | naudefj | Delete the dups and rerun the upgrade script. |
16:20.37 | naudefj | See example at http://archives.postgresql.org/pgsql-sql/1999-03/msg00239.php |
17:01.49 | naudefj | Is it working? |
17:02.25 | ginguar | not tried yet will let you know |
17:12.45 | naudefj | delete from fud30_index |
17:12.45 | naudefj | where exists ( select 'x' |
17:12.45 | naudefj | from fud30_index i |
17:12.45 | naudefj | where i.word_id = fud30_index.word_id |
17:12.46 | naudefj | and i.msg_id = fud30_index.msg_id |
17:12.49 | naudefj | and i.oid < fud30_index.oid |
17:12.51 | naudefj | ); |
17:13.05 | naudefj | Not tested, though. |
17:36.00 | ginguar | i'm working atm so will do as soon as i catch a break from the day job |
18:21.34 | ginguar | my other half is having a look at it, he says it didn't work but we'll keep looking |
18:32.49 | ginguar | more errors but we'll work through them |
18:33.17 | ginguar | they were just warnings but the consistency checker gave a fatal error |
18:43.01 | ginguar | error message currently Warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "rnum" already exists in /mounts/sg400/home/rocforum/FUDforum/include/theme/default/db.inc on line 96 |
18:43.02 | ginguar | Fatal error: Uncaught exception 'Exception' with message '(/mounts/sg400/home/rocforum/FUDforum/include/theme/default/db.inc:96<br /> /mounts/sg400/home/rocforum/FUDforum/include/theme/default/db.inc:157<br /> /mounts/sg400/home/rocforum/FUDforum/include/theme/default/th_adm.inc:110<br /> /mounts/sg400/home/rocforum/www/adm/consist.php:700<br /> ) : ERROR: relation "rnum" already exists<br /> Query: CREATE TEMPORARY SEQUENCE rnum<br /> _GET: |
18:43.02 | ginguar | array ( 'enable_forum' => '1', 'S' => '239cf79f5f1d3d57c27c91487e7617d6', 'SQ' => 'ac04d13ba7992b0854e3c094f2095cf2', )<br /> Database version: 8.4.0<br /> [Referring Page] http://forum.rocketry.co.uk/upgrade.php<br /> ' in /mounts/sg400/home/rocforum/FUDforum/include/core.inc:187 Stack trace: #0 /mounts/sg400/home/rocforum/FUDforum/include/theme/default/db.inc(96): fud_sql_error_handler('CREATE TEMPORAR...', 'ERROR: relatio...', '', |
18:43.02 | ginguar | '8.4.0') #1 /mounts/sg400/home/rocforum/FUDforum/include/theme/default/db.inc(157): q('CREATE TEMPORAR...') #2 /mounts/sg400/home/rocforum/FUDforum/include/theme/default/th_adm.inc(110): q_rownum() #3 /mounts/sg400/home/rocforum/www/adm/consist.php(700): rebuild_forum_view_ttl('4') #4 {main} thrown in /mounts/sg400/home/rocforum/FUDforum/include/core.inc on line 187 |
18:47.54 | ginguar | we have no clue? have you? |
18:54.42 | ginguar | looks like if i turn the forum back on it works but not sure if testing it will break something |
19:15.31 | naudefj | It fails on: CREATE TEMPORARY SEQUENCE rnum; |
19:15.50 | ginguar | yep |
19:15.56 | naudefj | My guess is you have something else in the DB called rnum. |
19:16.09 | naudefj | Can you please check? |
19:16.21 | ginguar | in a bit |
19:18.43 | ginguar | sorry still busy |
19:20.45 | ginguar | other half just checked and said there aren't any other relations called that |
19:21.27 | naudefj | Strange. What happens if he execte the statement? Same error? |
19:33.54 | naudefj | You can maybe change it to "fud_rnum" in sql/pgsql/db.inc and rebuild the theme. |
19:36.22 | ginguar | works fine when i just run that |
19:42.19 | naudefj | Ah, now I understand what's happening... |
19:42.43 | naudefj | q_rownum() is called for each forum, so it will fail on the second. |
19:42.50 | naudefj | Your forum should be OK for now. |
19:42.59 | naudefj | <PROTECTED> |
19:43.38 | ginguar | cool |
20:07.35 | ginguar | all the forums are empty |
20:07.56 | naudefj | Here's the solution: |
20:08.17 | naudefj | Edit sql/pgsql/db.inc and add |
20:08.35 | naudefj | q('DROP SEQUENCE IF EXISTS fud_rnum'); |
20:08.48 | naudefj | just before: q('DROP SEQUENCE IF EXISTS fud_rnum'); |
20:09.07 | naudefj | Rebuild the theme and run the consistency checker. |
20:11.28 | naudefj | c/fud_rnum/rnum/ |
20:12.41 | ginguar | how do rebuilt the theme |
20:13.05 | ginguar | ignore that |
20:13.10 | ginguar | the rebuild all themes link |
20:16.12 | ginguar | success |
20:16.18 | ginguar | thank you very much |
20:17.31 | naudefj | Great news :-) |
20:19.36 | ginguar | if you need anyone to do any documentaion or to sanity check it please feel free to prod me |
20:19.47 | ginguar | if i can help with fudforum i'd love to |
20:20.08 | ginguar | but i'm a support person not a devloper |
20:21.58 | naudefj | Will do. Much appreciated! |
20:22.02 | naudefj | BTW: You alreay helped a great deal to get this issue resolved. |
20:23.12 | ginguar | if things need tested in postgres in the future let me know i should be able to persuade my other half to create a new session just for testing |
20:23.49 | naudefj | We all have our roles to play. I can write code, but cannot design, nor write good documentation as I'm not a native English speaker. |
20:24.11 | naudefj | Thanks! |
20:24.53 | naudefj | Have you tested with PostgreSQL 9? |
20:25.36 | naudefj | I don't have 9 installed yet. It would be great if you can maybe test FUDforum against it. |
20:32.22 | ginguar | we are on 8.4 |
20:32.38 | ginguar | will speak nicely to the db boss |
20:32.57 | ginguar | see if we can do something to help |