วิธี ปิด/เปิด Autovacuum เพื่อทำ Restore Database

Post Reply
brid.surapol
Posts: 150
Joined: 11 Apr 2013, 11:43

วิธี ปิด/เปิด Autovacuum เพื่อทำ Restore Database

Post by brid.surapol »

1. ปิด autovacuum

1.1 ที่ postgres home
1.2 stop postgresql
1.3

Code: Select all

./autovacuum_off.sh
1.4 start postgresql


2. restore db (cat db.gz | gunzip > . . .)


3. run Full Vacuum

Code: Select all

psql -p PORT# db_name
VACUUM (ANALYZE);
แบบให้แสดงรายละเอียดการ vacuum

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
4.4 start postgresql
Post Reply

Return to “การใช้งาน PostgreSQL”