Postgres error [message #8545] |
Fri, 07 February 2003 01:31 |
ftzdomino
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 |
Ilia
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 #8632 is a reply to message #8631] |
Tue, 11 February 2003 22:06 |
Ilia
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
|
|
|