FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Postgres error
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Postgres error [message #8545] Fri, 07 February 2003 01:31 Go to next message
ftzdomino is currently offline  ftzdomino   United States
Messages: 2
Registered: February 2003
Karma: 0
Junior Member
Line 194 of compact.php:

q("ALTER TABLE ".$GLOBALS['DBHOST_TBL_PREFIX']."pmsg ADD INDEX(foff)");

This is a mysql call and will not work in postgres. It should read something like:

q("create index ".$GLOBALS['DBHOST_TBL_PREFIX']."pmsg_foff_idx on ".$GLOBALS['DBHOST_TBL_PREFIX']."pmsg (foff)");

Line 226 also must be changed to:

q("drop index ".$GLOBALS['DBHOST_TBL_PREFIX']."pmsg_foff_idx");

And line 195:
db_lock($GLOBALS['DBHOST_TBL_PREFIX'].'pmsg+, '.$GLOBALS['DBHOST_TBL_PREFIX'].'replace+');

Must also not be run as it creates recursive lock errors and this is an issue that should be handled in transactions instead.


[Updated on: Fri, 07 February 2003 01:34]

Report message to a moderator

Re: Postgres error [message #8629 is a reply to message #8545] Tue, 11 February 2003 21:36 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The query fix has been impelemented, however I do not see the recursive lock you've mentioned. By the time the db_lock() you've mentioned occurs, the previous lock on the replace table is already released.

FUDforum Core Developer
Re: Postgres error [message #8631 is a reply to message #8545] Tue, 11 February 2003 22:00 Go to previous messageGo to next message
ftzdomino is currently offline  ftzdomino   United States
Messages: 2
Registered: February 2003
Karma: 0
Junior Member
It's possible that this was just an issue caused by the script dying initially before the sql was corrected. I'll keep playing with it and post any updates if found. btw, FUD Forum looks really great so far.
Re: Postgres error [message #8632 is a reply to message #8631] Tue, 11 February 2003 22:06 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Thanks, hopefuly with the next release PostgreSQL will be more 'stable' then in the current release.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: sql error when anonymous has no rights
Next Topic: first page of such forum (threads list) is empty
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 11:18:29 GMT 2024

Total time taken to generate the page: 0.05398 seconds