I came across yet another case of "i did vacuum full because it seemed like a good idea" today.. Urgh.
What do you guys think of a patch like the attached, which throws a warning when you run vacuum full from the maintenance dialog on a pre-9.0 version? -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
diff --git a/pgadmin/frm/frmMaintenance.cpp b/pgadmin/frm/frmMaintenance.cpp index 9a6585d..e2b65a5 100644 --- a/pgadmin/frm/frmMaintenance.cpp +++ b/pgadmin/frm/frmMaintenance.cpp @@ -120,6 +120,13 @@ wxString frmMaintenance::GetSql() { case 0: { + /* Warn about VACUUM FULL on < 9.0 */ + if (chkFull->GetValue() && + !conn->BackendMinimumVersion(9, 0)) + { + if (wxMessageBox(_("VACUUM FULL is not recommended due to table bloating issues - consider using CLUSTER instead.\nAre you sure you want to proceed with VACUUM FULL?"), _("Confirm VACUUM FULL?"), wxICON_QUESTION | wxYES_NO) == wxNO) + return wxEmptyString; + } sql = wxT("VACUUM "); if (chkFull->GetValue())
-- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers