Search Postgresql Archives

Re: wal files stay in the pg_xlog dir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/28/2015 01:59 PM, kingl wrote:
Hi Adrian

Thank you for your prompt reply.

For more in depth information take a look here:

http://www.postgresql.org/docs/9.4/interactive/wal-configuration.html

which deals with the WAL configuration settings and explains what you are seeing. To get up to speed on WAL in general start here:

http://www.postgresql.org/docs/9.4/interactive/wal.html

For



In the pg_xlog there are 2,015 wal files now. repmgr recommends to keep 5000
wal files however for our env that would be an overkill so i changed it to
2000.

That looks about right. The wal_keep_segments = 2000 is a nomimal number subject to the configuration settings explained in above link. Monitor this number for a period it should stay in the neighborhood of 2000.


the other issue is that the standby node has only 1345 wal files in the
pg_xlog, i thought that both nodes' pg_xlog should be exact the same?

The links above go into the full explanation. The short version is that WAL files are generally meant to be recycled. On the master you are overriding the recycling to a degree by using wal_keep_segments to force Postgres to keep at least 2000 files whether they can be recycled or not. The standby does not have that restriction so it is recycling the files more aggressively.


thank you again.



--
View this message in context: http://postgresql.nabble.com/wal-files-stay-in-the-pg-xlog-dir-tp5863782p5863791.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.




--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux