PostgreSQL database autovacuum process failed to start

Source: Internet
Author: User
Tags postgresql

Recently, several of the servers in the online PostgreSQL database have been updated very slowly, and have been detected and compared due to autovacuum not being started.


1. Use table Pg_stat_all_tables to view autovacuum execution record

Select Schemaname,relname,last_autovacuum,last_autoanalyze from Pg_stat_all_tables;

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/47/61/wKioL1P5_8qwmN2gAAEZ9Q0KloA474.jpg "title=" 3.png " alt= "Wkiol1p5_8qwmn2gaaez9q0kloa474.jpg"/> For example, found that all objects corresponding to the analyze and vacuum execution records are empty.


2. Using Ps-ef | grep postgres found postgres corresponding analyze and vacuum processes were not started

3. View the postgres.conf file and show all view autovacuum option set OK

Autovacuum = On


4. The three conditions for viewing the document Autovacuum startup are as follows:

a) set autovacuum = on

b) set track_counts = on

c) set /etc/hosts # to ping through localhost ( Not satisfied before the condition )

It turns out that this is the cause, the first time because of the project special reason in the/etc/hosts file for setting localhost.

Adding localhosts later did not restart PostgreSQL, causing track_counts to default to off without setting localhosts, and analyze and vacuum could not be started. The statistical information and vacuum of the database corresponding table were not executed successfully.


5. After the reason is found, the database is returned to normal after the maintenance time is restarted.



This article is from the "composer" blog, make sure to keep this source http://zuoqujia.blog.51cto.com/9151800/1544236

PostgreSQL database autovacuum process failed to start

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.