IRC log for #fudforum on 20101108

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.59ginguarhello
15:14.58ginguaranyone around to help me install the nice new functionality naudefj wrote for me
15:16.15naudefjYou need to install or upgrade to FUDforum 3.0.2RC2 to see it.
15:23.01ginguarthe moderate userr thing you wrote for me?
15:24.16ginguari'm currently on 3.0.1
15:33.20naudefjYes, it's included in 3.0.2RC2.
15:33.46ginguarcool, is RC2 stable?
15:33.58ginguarit's going on a live but not critical site
15:34.37naudefjI'm running 3.0.2RC2 on all my production sites.
15:34.44ginguar<PROTECTED>
15:47.31ginguarhi when trying to upgrade i got
15:47.33ginguarWarning: 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.33ginguarFatal 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.33ginguar/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.49ginguari'm using postgres
16:10.34naudefjDelete the dups and rerun the upgrade script.
16:20.37naudefjSee example at http://archives.postgresql.org/pgsql-sql/1999-03/msg00239.php
17:01.49naudefjIs it working?
17:02.25ginguarnot tried yet will let you know
17:12.45naudefjdelete from fud30_index
17:12.45naudefjwhere exists ( select 'x'
17:12.45naudefjfrom fud30_index i
17:12.45naudefjwhere i.word_id = fud30_index.word_id
17:12.46naudefjand i.msg_id = fud30_index.msg_id
17:12.49naudefjand i.oid < fud30_index.oid
17:12.51naudefj);
17:13.05naudefjNot tested, though.
17:36.00ginguari'm working atm so will do as soon as i catch a break from the day job
18:21.34ginguarmy other half is having a look at it, he says it didn't work but we'll keep looking
18:32.49ginguarmore errors but we'll work through them
18:33.17ginguarthey were just warnings but the consistency checker gave a fatal error
18:43.01ginguarerror 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.02ginguarFatal 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.02ginguararray ( 'enable_forum' =&gt; '1', 'S' =&gt; '239cf79f5f1d3d57c27c91487e7617d6', 'SQ' =&gt; '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.02ginguar'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.54ginguarwe have no clue? have you?
18:54.42ginguarlooks like if i turn the forum back on it works but not sure if testing it will break something
19:15.31naudefjIt fails on: CREATE TEMPORARY SEQUENCE rnum;
19:15.50ginguaryep
19:15.56naudefjMy guess is you have something else in the DB called rnum.
19:16.09naudefjCan you please check?
19:16.21ginguarin a bit
19:18.43ginguarsorry still busy
19:20.45ginguarother half just checked and said there aren't any other relations called that
19:21.27naudefjStrange. What happens if he execte the statement? Same error?
19:33.54naudefjYou can maybe change it to "fud_rnum" in sql/pgsql/db.inc and rebuild the theme.
19:36.22ginguarworks fine when i just run that
19:42.19naudefjAh, now I understand what's happening...
19:42.43naudefjq_rownum() is called for each forum, so it will fail on the second.
19:42.50naudefjYour forum should be OK for now.
19:42.59naudefj<PROTECTED>
19:43.38ginguarcool
20:07.35ginguarall the forums are empty
20:07.56naudefjHere's the solution:
20:08.17naudefjEdit sql/pgsql/db.inc and add
20:08.35naudefjq('DROP SEQUENCE IF EXISTS fud_rnum');
20:08.48naudefjjust before: q('DROP SEQUENCE IF EXISTS fud_rnum');
20:09.07naudefjRebuild the theme and run the consistency checker.
20:11.28naudefjc/fud_rnum/rnum/
20:12.41ginguarhow do  rebuilt the theme
20:13.05ginguarignore that
20:13.10ginguarthe rebuild all themes link
20:16.12ginguarsuccess
20:16.18ginguarthank you very much
20:17.31naudefjGreat news :-)
20:19.36ginguarif you need anyone to do any documentaion or to sanity check it please feel free to prod me
20:19.47ginguarif i can help with fudforum i'd love to
20:20.08ginguarbut i'm a support person not a devloper
20:21.58naudefjWill do. Much appreciated!
20:22.02naudefjBTW: You alreay helped a great deal to get this issue resolved.
20:23.12ginguarif 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.49naudefjWe 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.11naudefjThanks!
20:24.53naudefjHave you tested with PostgreSQL 9?
20:25.36naudefjI don't have 9 installed yet. It would be great if you can maybe test FUDforum against it.
20:32.22ginguarwe are on 8.4
20:32.38ginguarwill speak nicely to the db boss
20:32.57ginguarsee if we can do something to help

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.