postgreSQL Autovacuum launcher

In the last post we discussed about checkpoint process, in this tutorial we will discuss about PostgreSQL: Autovacuum launcher process.

postgreSQLpostgreSQL Autovacuum launcher autovacuum

launcher process

Autovacuum launcher is an optional process and it is enabled by default in PostgreSQL. This process automates the execution of vacuum and analyzes commands based on a few parameters.

If autovacuum is set, then it will wake up every autovacuum_naptime seconds, and decide whether to run VACUUM, ANALYZE, or both.

But what is vacuum?

You can read in detail about vacuum in PostgreSQL

The following are the relevant parameters that can be set in postgresql.conf file for autovacuum.

PostgreSQL implements Multi version Concurrency Control (MVCC), which allows users to read data at the same time as writers make changes. This is an important feature for
concurrency in database applications, as it can allow the following:

  • Better performance because of fewer locks
  • Greatly reduced deadlocking
  • Simplified application design and management

Case study on Vacuum and vacuumfull:

  • Create a test table
  • Insert some records into the table.

  • Delete few records and check the size again after vacuuming.

  • Test vacuumfull and confirm that filepath is changing for every vacuumfull.

 

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.

Leave a Reply