วิธี ปิด/เปิด Autovacuum เพื่อทำ Restore Database
Posted: 23 Apr 2016, 07:23
1. ปิด autovacuum
1.1 ที่ postgres home
1.2 stop postgresql
1.3
1.4 start postgresql
2. restore db (cat db.gz | gunzip > . . .)
3. run Full Vacuum
แบบให้แสดงรายละเอียดการ vacuum
4. เปิด autovacuum
4.1 ที่ postgres home
4.2 stop postgresql
4.3
4.4 start postgresql
1.1 ที่ postgres home
1.2 stop postgresql
1.3
Code: Select all
./autovacuum_off.sh
2. restore db (cat db.gz | gunzip > . . .)
3. run Full Vacuum
Code: Select all
psql -p PORT# db_name
VACUUM (ANALYZE);
Code: Select all
psql -p PORT# db_name
VACUUM (VERBOSE, ANALYZE);
4. เปิด autovacuum
4.1 ที่ postgres home
4.2 stop postgresql
4.3
Code: Select all
./autovacuum_on.sh