pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jason Ralph <jralph@affinitysolutions.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: QUERY: autovacuum: VACUUM ANALYZE table versus QUERY: autovacuum: VACUUM table
Date: Sat, 02 Nov 2019 10:22:27 -0400
Message-ID: <19520.1572704547@sss.pgh.pa.us> (raw)
In-Reply-To: <BL0PR04MB64991E90411166331F051CFCD07D0@BL0PR04MB6499.namprd04.prod.outlook.com>
References: <BL0PR04MB64991E90411166331F051CFCD07D0@BL0PR04MB6499.namprd04.prod.outlook.com>

Jason Ralph <jralph@affinitysolutions.com> writes:
> I am trying to find out if the naming convention from autovacuum does what its command line equivalent does, or at least what I think it does.

> QUERY: autovacuum: VACUUM ANALYZE table versus autovacuum: VACUUM ANALYZE table.

> I have been getting my autovacuum tuned and I have the settings where I see 2 types of queries running now and doing their jobs. I know vacuum alone will mark dead tuples ready for use again, and analyze alone will update statistics for the query planner.

> 1. QUERY: autovacuum: VACUUM ANALYZE table
> 2. QUERY: autovacuum: VACUUM table

> My question is do we need both?

Some autovacuum runs will do only VACUUM on a given table, some will do
only ANALYZE, and some will do both.  The decisions about which of
these operations are needed are related but not identical (one's based
on n_dead_tup and the other on n_mod_since_analyze, plus you can set
different threshold parameters to compare those to).  The pg_stat_activity
report of what's happening does match the command-line syntax.

			regards, tom lane





view thread (3+ messages)

Message-ID: <19520.1572704547@sss.pgh.pa.us>
Permalink:  ../19520.1572704547@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19520.1572704547@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jralph@affinitysolutions.com
  Subject: Re: QUERY: autovacuum: VACUUM ANALYZE table versus QUERY: autovacuum: VACUUM table
  In-Reply-To: <19520.1572704547@sss.pgh.pa.us>
  References: <BL0PR04MB64991E90411166331F051CFCD07D0@BL0PR04MB6499.namprd04.prod.outlook.com> <19520.1572704547@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox