As you said, I have gone through the document. Which one is correct [(2 + checkpoint_completion_target) * checkpoint_segments + 1 orcheckpoint_segments + wal_keep_segments + 1 files] for 9.2 PostgreSQL?
In my environment we have kept wal_keep_segments and checkpoint_segments as below. Will it cause any negative impact?
checkpoint_segments = 128# in logfile segments, min 1, 16MB each
There will always be at least one WAL segment file, and will normally not be more than (2 + checkpoint_completion_target) * checkpoint_segments + 1 or checkpoint_segments + wal_keep_segments + 1 files. Each segment file is normally 16 MB (though this size can be altered when building the server). You can use this to estimate space requirements for WAL. Ordinarily, when old log segment files are no longer needed, they are recycled (renamed to become the next segments in the numbered sequence). If, due to a short-term peak of log output rate, there are more than 3 * checkpoint_segments + 1 segment files, the unneeded segment files will be deleted instead of recycled until the system gets back under this limit.
1 wal by default occupies 16MB. The parameter in version 9.2 that controls this is: wal_keep_segments
By setting the parameter to 10, the maximum size of the US pg_xlog will be 160MB.
Best Regards,
Johnes Castro
De: Johnes Castro <johnescm@hotmail.com> Enviado: quarta-feira, 5 de setembro de 2018 15:48 Para: Raghavendra Rao J S V; pgsql-general@lists.postgresql.org Assunto: RE: Max number of WAL files in pg_xlog directory for Postgres 9.2 version
29.4. WAL Configuration. There are several WAL-related configuration parameters that affect database performance.This section explains their use. Consult Chapter 18 for general information about setting server configuration parameters.. Checkpoints are points in the sequence of transactions at which it is guaranteed that the heap and index data files have been updated with all information ...
Please let me know, how many max number of wal files in pg_xlog directory?
What is the formul. I am seeing different formulas. Could you provide me which decides number of max WAL files in PG_XLOG directory for Postgres 9.2 Database,please?