Search Postgresql Archives

Re: Why autvacuum is not started?

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

 



On 01/09/2017 08:45 AM, Edmundo Robles wrote:
I have running Postgresql  9.4 and... if i have  a  table  with
 following  configuration:
autovacuum_vacuum_scale_factor=0.0,
autovacuum_analyze_scale_factor=0.0,
autovacuum_vacuum_threshold=1000,
autovacuum_analyze_threshold=1000,
autovacuum_enabled=true

Why  autovacuum is not started if  the table has more than 1000 inserts???

https://www.postgresql.org/docs/9.4/static/runtime-config-autovacuum.html#GUC-AUTOVACUUM-VACUUM-THRESHOLD

"autovacuum_vacuum_threshold (integer)

Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50 tuples. This parameter can only be set in the postgresql.conf file or on the server command line. This setting can be overridden for individual tables by changing storage parameters.
"

INSERTs don't count.

They do for analyze though:

"autovacuum_analyze_threshold (integer)

Specifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE in any one table. The default is 50 tuples. This parameter can only be set in the postgresql.conf file or on the server command line. This setting can be overridden for individual tables by changing storage parameters.
"

first  i have  setted  autovacuum_vacuum_threshold to 10,000  inserts
(it is normal each 2 hours ), then to  5,000, 3,000 and  finally  to
1,000 but  autovacuum is not triggered  but autoanalyze.

"select relname,last_vacuum, last_autovacuum, last_analyze,
last_autoanalyze from pg_stat_user_tables where relname like 'sta%';"

last_vacuum=>2017-01-05 10:40:34.228633-06
last_autovacuum => null
last_analyze=>  2017-01-04 15:02:47.438715-06
last_autoanalyze=> 2017-01-09 10:35:51.391114-06

--



--
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