MyBB Community Forums
[F] [PostgreSQL] Optimize Database [R] - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: Archived Bug Reports (https://community.mybb.com/forum-74.html)
+------ Forum: MyBB 1.4.2 (https://community.mybb.com/forum-100.html)
+------ Thread: [F] [PostgreSQL] Optimize Database [R] (/thread-40627.html)



[F] [PostgreSQL] Optimize Database [R] - Chris W. B. - 2008-11-17

On a forum that is running PostgreSQL, the optimize table tool doesn't work in the Admin CP.

To reproduce the error, follow the steps below:

1. Admin CP > 'Tools & Maintenance' Tab > Optimize Database (Left Menu)
2. Click "Select All" in the Table Selection area
3. Click "Optimize Selected Tables"

The following error is returned:

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
    42601 - ERROR: syntax error at or near "TABLE" LINE 1: ANALYZE TABLE trunk_settinggroups ^ 
Query:
    ANALYZE TABLE trunk_settinggroups 

PostgreSQL 8.3.4
PHP 5.2.6
MyBB 1.4.3


RE: [PostgreSQL] Optimize Database [R] - DoctorCasino - 2008-11-17

Yes, because

ANALYZE TABLE tablename is wrong. The query goes without the TABLE statement. Btw...I think that VACUUM ANALYZE tablename would be better, because it cleans up the tables and reindexes them.


[F] [PostgreSQL] Optimize Database [R] - Ryan Gordon - 2008-11-17

Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group