Page 1 of 1
Files Won't Defragment

Posted:
Tue Jul 29, 2008 10:24 am
by Lucky Stiff
Lately when I try to defragment my hard drive there are many Postgres files which will not go through the process. Is there a fix for this?
Re: Files Won't Defragment

Posted:
Tue Jul 29, 2008 3:16 pm
by WhiteRider
I'm not 100% sure about this, but I suspect postgres files can't be defragmented because they are 'managed' files. Postgres is in charge of their layout, and if they get moved around it could cause problems.
Of course, it might just be that they can't be defragged while the postgres service is running..
Re: Files Won't Defragment

Posted:
Tue Jul 29, 2008 4:54 pm
by keggler
1. do a cluster & analyse first.
2. defrag after stopping the postgres service.
3, if that doesn't get 'em, defrag in safe mode.
4, if that still doesn't get 'em, get contig, the single file defragger from sysinternals...
susan
Re: Files Won't Defragment

Posted:
Tue Jul 29, 2008 7:02 pm
by six4withafro
you also need a decent amount of empty space on the hdd/partition being defragged for these files to defrag completely. i use executive software diskeeper, fwiw.
Re: Files Won't Defragment

Posted:
Tue Jul 29, 2008 7:03 pm
by Lucky Stiff
keggler wrote:1. do a cluster & analyse first.
2. defrag after stopping the postgres service.
3, if that doesn't get 'em, defrag in safe mode.
4, if that still doesn't get 'em, get contig, the single file defragger from sysinternals...
susan
Thanks. Cluster/analyze had no effect. How does one stop the postgres service and does it need to be restarted after the defrag process? How does one enter safe mode?
Re: Files Won't Defragment

Posted:
Wed Jul 30, 2008 4:02 am
by WhiteRider
To stop postgres:
Start -> Programs -> Postgres -> Stop Service
Safe Mode is described here:
viewtopic.php?f=17&t=8753&p=40321&hilit=+safe+mode#p40321