<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><span></span></div><div>Hi Trưởng,<div><br></div><div>Số lượng WAL files dưới pg_xlog sẽ ổn định khoảng = max_wal_size/16 (với phiên bản nhỏ hơn 9.5 có cách tính khác).</div><div># một số trường hợp workload lớn sẽ có giá trị lớn hơn giá trị này trong một time ngắn.</div><div><br></div><div>Việc xoá và tái sử dụng WAL files được thực hiện trên tiến trình checkpointer (từ phiên bản 9.2, trước đó trên background writer). </div><div><br></div><div>Cụ thể bạn có thể tham khảo bên dưới.</div><div><br></div><div><a href="https://www.postgresql.org/docs/9.6/static/wal-configuration.html">https://www.postgresql.org/docs/9.6/static/wal-configuration.html</a></div><div><br></div><div><a href="https://www.postgresql.vn/blog/checkpoint">https://www.postgresql.vn/blog/checkpoint</a><br><br><div><div>---</div>Dang Minh Huong</div><div><br>On Jun 19, 2018, at 6:43 AM, truongvt2 <<a href="mailto:truongd09vt2@gmail.com">truongd09vt2@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div>Dear anh Hướng</div><div><br></div><div>Anh vui long giải thích giúp em về <br></div><div><br></div><div>1. Số file (wal_segment_file) nhỏ nhất sẽ được lưu trữ tại pg_xlog?</div><div>2. Cơ chế nào của postgresql sẽ control việc xóa và quyết định giữ bao nhiêu file lại ?</div><div><br></div><div>E mong nhận được phản hồi từ anh  ạ</div><div><br></div><div>Thanks and best regards</div><div>E Trưởng<br></div></div>
</div></blockquote></div></div></body></html>