Обсуждение: Question
Hi, I have a database with 100 GB size, I never have done a vacuumdb to it, analizyng, there is a table witn almost 25 GB, I have to run a Vaccum to clean it.. This is a longer operation. But somebody said me that if I make a backup(pg_dump), drop the database, create db, an then restore again, tha database is cleaned(recover disk space) and reindexed, is that true? If is true, how long is this? Thnaks for your help. Fabio. Aviso de confidencialidad: Este mensaje de correo electrónico contiene información estrictamente confidencial no susceptible de ser distribuida. Si usted no es el destinatario de este mensaje, por favor no publicarlo, copiarlo o tomar cualquier otro tipo de accion sobre esta transmision. Si recibio este mensaje por error, por favor notifiquenoslo y eliminelo lo antes posible. Warning of confidentiality: This message of electronic mail contains strictly confidential information nonsusceptible to be distributed. If you are not the adressee of this message, please do not publish it, copy it or take any other kind of action on this transmission. If you got this message by mistake, please notify it to us and eliminate it as soon as possible.
First its bad style to use a generic subject like "Question". Use something related to the specific problem. "Help" is an other poor choice. Second you need to put in a lot more information about your setup. As an absolute minimum provide postgresql release and operating system. Third it sounds like you've got some reading to do. The manual and this book would be a good place to start: http://www.faqs.org/docs/ppbook/book1.htm While you read you should run the command "vacuum analyze", this is going to take a REALLY LONG time. 12 to 24 hours wouldn't surprise me. But at least the base will still be online although with degraded performance. When you've got a better handle on thing I suggest you do a pg_dumpall, drop the base and perform a restore. You are likely to run on a more or less outdated version so while doing the dump and restore you should consider upgrading to the latest version. The INSTALL document in the source distro tells how to perform dump/restore when upgrading. I'm able to do a dump of a 50Gig base in one hour but the restore time depends a lot on what sort of index'es you have. Don't hold your breath waiting. All this depends a lot on what sort of hardware you have. Cheers, John >>> <FBaron@co.belcorp.biz> 23-02-05 17:11 >>> Hi, I have a database with 100 GB size, I never have done a vacuumdb to it, analizyng, there is a table witn almost 25 GB, I have to run a Vaccum to clean it.. This is a longer operation. But somebody said me that if I make a backup(pg_dump), drop the database, create db, an then restore again, tha database is cleaned(recover disk space) and reindexed, is that true? If is true, how long is this? Thnaks for your help. Fabio.