In the last post we discussed about checkpoint process, in this tutorial we will discuss about
- PostgreSQL: Logger process
- PostgreSQL: WAL writer process:
PostgreSQL: logger process:
logger process is a background process that captures log messages sent to stderr and redirects them into log files.
The process works when logging_collector parameter is enabled.
Set the following parameters in postgresql.conf file to enable logging.
1 2 3 |
log_destination = 'stderr' logging_collector = on log_directory = 'pg_log' |
PostgreSQL:WAL writer process:
When we make changes to the data, the changes are first written to the buffers and records of these changes are written to the WAL buffer, the changes are flushed to the WAL segments when the changes are committed. Here writer process process is responsible for flushing the changes made to wal files.
To find the current wal location file, we query
1 2 3 4 5 6 7 |
postgres=# SELECT pg_xlogfile_name(pg_current_xlog_location()); pg_xlogfile_name -------------------------- 00000001000000000000007C (1 row) postgres=# |
Thank you for giving your valuable time to read the above information. I hope the content served your purpose in reaching out the blog.
Suggestions for improvement of the blog are highly appreciable. Please contact us for any information/suggestion/feedback.
If you want to be updated with all our articles
please follow us on Facebook | Twitter
Please subscribe to our newsletter.