How long should I expect WAL files in $PGDATA/pg_xlog to hang around? Last night I loaded up around 8GB of data and in the morning I there were 118 files in $PGDATA/pg_xlog. They didn't go away until after I shutdown and restarted the database and I saw a bunch of "DEBUG: MoveOfflineLogs: remove 0000000200000008" in my logfiles. Brian
"Brian Baquiran" <brianb@edsamail.com> writes:
> How long should I expect WAL files in $PGDATA/pg_xlog to hang around?
It depends. How long are your transactions?
The current algorithm is for each checkpoint to discard log data before
the start of the oldest transaction that was open during the last
checkpoint.
Checkpoints don't happen if nothing has happened since the last
checkpoint, so if you just sit there and watch pg_xlog then you
won't see anything disappearing. But if you're using the database then
old files should get cleaned up with reasonable promptness.
regards, tom lane
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера