How do I uninstall monitoring services plugin and db tables


I had the Monitoring Services plugin installed and it collected a great deal of information. Something in the db became corrupted and now when I backup my db, I get an error in ofmessagearchive.

openfire=# delete from ofmessagearchive where ctid=’(110428,1)’;

ERROR: invalid page header in block 110428 of relation “ofmessagearchive”

I uninstalled the plugin, but the tables are still there. Is it safe to simply drop all the tables that are associated with Monitoring Services plugin (by reading which they were from the original schema file). My concern is that something still might be referenced somewhere and I may make matters worse.

Sorry, my last post was confusing. Anytime I scan over that bad block, whether it be from using pg_dump, select, or delete, like above, I get that same error. I can’t find which record it is. I’m tempted to simply do a “delete from ofmessagearchive”, but I wanted to make sure that that is afe.

I think you will have to give it a try and delete those tables (but making backup of a db first of course). Don’t think someone will be able to say what exactly is corrupted.

Hi wr00t. Thank you for the reply. You’ve re-assured me that dropping those tables should not be a problem, but I still can’t get a fresh backup of the db, before starting. Here’s the output:

[root@our_host ~]# su - postgres -c ‘pg_dump -Fc openfire > /tmp/openfire_custom_April_11th_2011.sql’

pg_dump: SQL command failed

pg_dump: Error message from server: ERROR: invalid page header in block 110428 of relation “ofmessagearchive”

pg_dump: The command was: COPY public.ofmessagearchive (conversationid, fromjid, tojid, sentdate, body) TO stdout;

I’m more just reporting this here for reference. The DB had become corrupted when it lost a disk in the RAID 10. I replaced the disk, added it again, rebuilt, fscked, got everything clean and stuch, but I had this one corrupt block. I’m thinking worst case I’ll have to drop the DB and recreate it, but I’ll experiment with dropping the offending table first. Thanks for your help.

I was able to obtain a backup, by backing up each individual table, and skipping the ones related to the monitoring services.

su - postgres -c ‘pg_dump -Fp -t ofuser -t ofuserprop -t ofuserflag -t ofprivate -t ofoffline -t ofpresence -t ofrostergroups -t ofroster -t ofvcard -t ofgroup -t ofgroupprop -t ofgroupuser -t ofid -t ofproperty -t ofversion -t ofextcomponentconf -t ofremoteserverconf -t ofprivacylist -t ofsaslauthorized -t ofsecurityauditlog -t ofmucservice -t ofmucserviceprop -t ofmucroom -t ofmucroomprop -t ofmucaffiliation -t ofmucmember -t ofmucconversationlog -t ofpubsubnode -t ofpubsubnodejids -t ofpubsubnodegroups -t ofpubsubaffiliation -t ofpubsubitem -t ofpubsubsubscription -t ofpubsubdefaultconf openfire > /tmp/openfire_plain_tabledump_April_11th_2011.sql’

Then I was able to drop the ofmessagearchive table, and make a proper backup.

Now, I should be able to upgrade to 3.7.

ascott wrote:

Now, I should be able to upgrade to 3.7.

FYI, s2s is broken in 3.7. OF-443. Also it seems that some clients have problems connecting to 3.7 (like Psi and sometimes Kopete and others).