wal_keep_segments and max_wal_size

Поиск
Список
Период
Сортировка
От Atul Kumar
Тема wal_keep_segments and max_wal_size
Дата
Msg-id CA+ONtZ7jx6WnuRkRXUXfzu9kbjsWqE1ntQsMyAiif=W0vQZO7g@mail.gmail.com
обсуждение исходный текст
Ответы Re: wal_keep_segments and max_wal_size  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-general
hi,

(on postgres 9.6) I was just practicing to make my no. of wal files in
pg_xlog directory to be the same/equal as I pass on wal_keep_segments
paramater.

say for example
show wal_keep_segments;
 wal_keep_segments
-------------------
 125


so I want my wal files should not be grow in numbers more than 125 so
for that I have changed the parameter of max_wal_size to 2 GB to limit
the size of pg_xlog directory.

 show max_wal_size;
 max_wal_size
--------------
 2GB
(1 row)


but I did some testing by bulk inserts then the number of wal files
has grown more than 125.

and the size of pg_xlog directory also reached to 2.7 GB.

/data/apps/edb/as96/data/pg_xlog 04:05:08]$ ls | wc -l
173

/data/apps/edb/as96/data 04:05:11]$ du -sh pg_xlog/
2.7G    pg_xlog/


I wonder why I faced such behavior bcz I  limited the size of pg_xlog
directory by setting max_wal_size to 2GB that should be equivalent to
around 125 number of wal file in the pg_xlog directory.


please suggest how should I make both identical (wal_keep_segments and
max_wal_size).





regards,
Atul



В списке pgsql-general по дате отправления:

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: number of wal file is not reduced.
Следующее
От: Atul Kumar
Дата:
Сообщение: Re: number of wal file is not reduced.