Re: Size of Postgres Transaction Logs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Size of Postgres Transaction Logs
Дата
Msg-id 20095.990204347@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Size of Postgres Transaction Logs  (Vikaas BV <vikas@cellcloud.com>)
Ответы Re: Size of Postgres Transaction Logs  (Lincoln Yeoh <lyeoh@pop.jaring.my>)
Список pgsql-general
Vikaas BV <vikas@cellcloud.com> writes:
> I find that if there
> are repeated periodic operations on the postgres database, the
> transaction log size increases very rapidly (I was aghast to see that
> after initializing a new database with only 2 tables and a program
> polling one of the tables every 20 secs, the transaction log had grown
> to 120MB overnight) and there appears to be no mechanism of reducing the
> log size except for taking a dump, reinitializing the database and
> reimporting the dump.

The WAL log should be auto-truncated at checkpoints, assuming that the
old entries are no longer needed.  However, if you leave uncommitted
transactions sitting around, their WAL entries can't be deleted until
you commit or abort them.  I'd only expect massive WAL growth if you
have very long-running transactions ...

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: Performance aggregates
Следующее
От: Justin Clift
Дата:
Сообщение: Re: Which OS to Use for Postgresql