Difference between revisions of "Autovacuum"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
* <code>[[select category]], name,setting,unit,source,min_val,max_val from pg_settings where category = 'Autovacuum' ; </code>
+
* https://www.postgresql.org/docs/current/routine-vacuuming.html
  
*<code>[[select count]](*) from [[pg_stat_activity]] where query like '[[autovacuum]]:%';</code>
+
select category,name,setting,unit,source,min_val,max_val from pg_settings where category = 'Autovacuum';
 +
  category  |                name                |  setting  | unit |      source      | min_val |  max_val
 +
------------+-------------------------------------+-----------+------+--------------------+---------+------------
 +
  Autovacuum | [[autovacuum]]                          | on        |      | default            |        |
 +
  Autovacuum | [[autovacuum_analyze_scale_factor]]    | 0.05      |      | configuration file | 0      | 100
 +
  Autovacuum | [[autovacuum_analyze_threshold]]        | 50        |      | default            | 0      | 2147483647
 +
  Autovacuum | [[autovacuum_freeze_max_age]]          | 200000000 |      | default            | 100000  | 2000000000
 +
  Autovacuum | [[autovacuum_max_workers]]              | 3        |      | configuration file | 1      | 262143
 +
  Autovacuum | [[autovacuum_multixact_freeze_max_age]] | 400000000 |      | default            | 10000  | 2000000000
 +
  Autovacuum | [[autovacuum_naptime]]                  | 15        | s    | configuration file | 1      | 2147483
 +
  Autovacuum | [[autovacuum_vacuum_cost_delay]]        | 2        | ms  | default            | -1      | 100
 +
  Autovacuum | [[autovacuum_vacuum_cost_limit]]       | 200      |      | configuration file | -1      | 10000
 +
  Autovacuum | [[autovacuum_vacuum_scale_factor]]     | 0.1      |      | configuration file | 0      | 100
 +
  Autovacuum | [[autovacuum_vacuum_threshold]]         | 50        |      | default            | 0      | 2147483647
 +
(11 rows)
  
 +
 +
 +
[[select category]],name,setting,unit,source,min_val,max_val from pg_settings where category = 'Autovacuum';
 +
  category  |                name                |  setting  | unit | source  | min_val |  max_val
 +
------------+-------------------------------------+-----------+------+---------+---------+------------
 +
  Autovacuum | autovacuum                          | on        |      | default |        |
 +
  Autovacuum | autovacuum_analyze_scale_factor    | 0.1      |      | default | 0      | 100
 +
  Autovacuum | autovacuum_analyze_threshold        | 50        |      | default | 0      | 2147483647
 +
  Autovacuum | autovacuum_freeze_max_age          | 200000000 |      | default | 100000  | 2000000000
 +
  Autovacuum | autovacuum_max_workers              | 3        |      | default | 1      | 262143
 +
  Autovacuum | autovacuum_multixact_freeze_max_age | 400000000 |      | default | 10000  | 2000000000
 +
  Autovacuum | autovacuum_naptime                  | 60        | s    | default | 1      | 2147483
 +
  Autovacuum | autovacuum_vacuum_cost_delay        | 2        | ms  | default | -1      | 100
 +
  Autovacuum | autovacuum_vacuum_cost_limit        | -1        |      | default | -1      | 10000
 +
  Autovacuum | autovacuum_vacuum_scale_factor      | 0.2      |      | default | 0      | 100
 +
  Autovacuum | autovacuum_vacuum_threshold        | 50        |      | default | 0      | 2147483647
 +
(11 rows)
 +
 +
 +
 +
[[select count]](*) from [[pg_stat_activity]] where query like '[[autovacuum]]:%';
 +
  count
 +
-------
 +
      0
 +
(1 row)
 +
 +
SELECT
 +
  schemaname, relname,
 +
  last_vacuum, last_autovacuum,
 +
  vacuum_count, autovacuum_count
 +
FROM [[pg_stat_user_tables]];
  
 
==Activites==
 
==Activites==
  
 
*Read Understanding autovacuum in Amazon RDS for PostgreSQL environments, 2020: https://aws.amazon.com/blogs/database/understanding-autovacuum-in-amazon-rds-for-postgresql-environments/
 
*Read Understanding autovacuum in Amazon RDS for PostgreSQL environments, 2020: https://aws.amazon.com/blogs/database/understanding-autovacuum-in-amazon-rds-for-postgresql-environments/
 +
* Read https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.Autovacuum.html
 
* [[DataFileRead]]
 
* [[DataFileRead]]
* Understand [[EXPLAIN]] output
+
* Understand <code>[[EXPLAIN]]</code> output
 +
 
 +
== Related terms ==
 +
* [[PostgreSQL VACUUM]]
 +
* <code>[[pg_database]]</code>
 +
* [[Cache hit ratio]]
 +
* <code>[[pg database]]</code>
 +
* [[Autoanalyze]]
 +
[[LOG:  autovacuum launcher started]]
 +
[[postgres: autovacuum launcher]]
  
 
== See also ==
 
== See also ==
 +
* {{VACUUM}}
 
* {{SQL}}
 
* {{SQL}}
 
* {{PostgreSQL}}
 
* {{PostgreSQL}}

Latest revision as of 08:57, 9 January 2024

select category,name,setting,unit,source,min_val,max_val from pg_settings where category = 'Autovacuum';
  category  |                name                 |  setting  | unit |       source       | min_val |  max_val
------------+-------------------------------------+-----------+------+--------------------+---------+------------
 Autovacuum | autovacuum                          | on        |      | default            |         |
 Autovacuum | autovacuum_analyze_scale_factor     | 0.05      |      | configuration file | 0       | 100
 Autovacuum | autovacuum_analyze_threshold        | 50        |      | default            | 0       | 2147483647
 Autovacuum | autovacuum_freeze_max_age           | 200000000 |      | default            | 100000  | 2000000000
 Autovacuum | autovacuum_max_workers              | 3         |      | configuration file | 1       | 262143
 Autovacuum | autovacuum_multixact_freeze_max_age | 400000000 |      | default            | 10000   | 2000000000
 Autovacuum | autovacuum_naptime                  | 15        | s    | configuration file | 1       | 2147483
 Autovacuum | autovacuum_vacuum_cost_delay        | 2         | ms   | default            | -1      | 100
 Autovacuum | autovacuum_vacuum_cost_limit        | 200       |      | configuration file | -1      | 10000
 Autovacuum | autovacuum_vacuum_scale_factor      | 0.1       |      | configuration file | 0       | 100
 Autovacuum | autovacuum_vacuum_threshold         | 50        |      | default            | 0       | 2147483647
(11 rows)


select category,name,setting,unit,source,min_val,max_val from pg_settings where category = 'Autovacuum';
  category  |                name                 |  setting  | unit | source  | min_val |  max_val
------------+-------------------------------------+-----------+------+---------+---------+------------
 Autovacuum | autovacuum                          | on        |      | default |         |
 Autovacuum | autovacuum_analyze_scale_factor     | 0.1       |      | default | 0       | 100
 Autovacuum | autovacuum_analyze_threshold        | 50        |      | default | 0       | 2147483647
 Autovacuum | autovacuum_freeze_max_age           | 200000000 |      | default | 100000  | 2000000000
 Autovacuum | autovacuum_max_workers              | 3         |      | default | 1       | 262143
 Autovacuum | autovacuum_multixact_freeze_max_age | 400000000 |      | default | 10000   | 2000000000
 Autovacuum | autovacuum_naptime                  | 60        | s    | default | 1       | 2147483
 Autovacuum | autovacuum_vacuum_cost_delay        | 2         | ms   | default | -1      | 100
 Autovacuum | autovacuum_vacuum_cost_limit        | -1        |      | default | -1      | 10000
 Autovacuum | autovacuum_vacuum_scale_factor      | 0.2       |      | default | 0       | 100
 Autovacuum | autovacuum_vacuum_threshold         | 50        |      | default | 0       | 2147483647
(11 rows)


select count(*) from pg_stat_activity where query like 'autovacuum:%';
 count
-------
     0
(1 row)
SELECT
  schemaname, relname,
  last_vacuum, last_autovacuum,
  vacuum_count, autovacuum_count
FROM pg_stat_user_tables;

Activites[edit]

Related terms[edit]

LOG:  autovacuum launcher started
postgres: autovacuum launcher

See also[edit]

Advertising: