On 15.10.18 19:55, Bruce Momjian wrote:
> On Mon, Oct 15, 2018 at 10:52:33AM -0700, Christophe Pettus wrote:
>>
>>> On Oct 15, 2018, at 10:49, Bruce Momjian <bruce@momjian.us> wrote:
>>> Now that the directory is named pg_wal in PG 10, we might not need this.
>> I wish I could say that, but we just had a client ask if they could do exactly that, on 10...
> Oh, even after the rename!
Ran into a similar case, someone asked why the pg_wal directory uses
half a GB of disk space, and if it can be removed.
Given that "pg_xlog" versions are still supported, I propose the
following updated FAQ entry:
Question: The files in pg_xlog/* or pg_wal/* take up a lot of disk
space, can they be removed?
Answer:
Under no circumstances must files in the pg_xlog/ (up to PostgreSQL 9.6)
or pg_wal/ (beginning PostgreSQL 10) directory be removed, they are
essential for the database operation. The files in this directory store
the transaction logs, without these files the database can't recover
after a crash or shutdown.
The size of the pg_xlog/ or pg_wal/ directory can be configured by
setting the "min_wal_size" and "max_wal_size" GUC (PostgreSQL 9.5 and
newer), or by setting the "checkpoint_segments" GUC (PostgreSQL 9.4 and
earlier).
https://www.postgresql.org/docs/current/static/runtime-config-wal.html
https://www.postgresql.org/docs/9.4/static/runtime-config-wal.html
Regards,
--
Andreas 'ads' Scherbaum
German PostgreSQL User Group
European PostgreSQL User Group - Board of Directors
Volunteer Regional Contact, Germany - PostgreSQL Project