Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gz1sR-00014b-CR for pgsql-performance@arkaria.postgresql.org; Wed, 27 Feb 2019 16:16:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gz1sP-0004Zr-Dr for pgsql-performance@arkaria.postgresql.org; Wed, 27 Feb 2019 16:16:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gz1sO-0004Zk-UR for pgsql-performance@lists.postgresql.org; Wed, 27 Feb 2019 16:16:09 +0000 Received: from mail-it1-x136.google.com ([2607:f8b0:4864:20::136]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gz1sH-0007Os-0A for pgsql-performance@postgresql.org; Wed, 27 Feb 2019 16:16:07 +0000 Received: by mail-it1-x136.google.com with SMTP id l139so8589840ita.5 for ; Wed, 27 Feb 2019 08:16:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=oiRMc8r7EiKXiG9T8a9rZtctjJAl/UJbUkixVP6iM2o=; b=Pfzavdtt+RnWZjuwVkjYd/62ctCe7pp50RXI0EKcFy+hLQsDDZ0fMPKdUcAhGClm3B Aptxf51KFnhaUri5iqzw/eT6a6Lo8xTbkfS939Xdb15to4hj19OO52y0Nwb6yQGYaT74 7q42PmPzCpm7lyHs7x3viuP4Nm+WnwcEAMiSSVHWmCo5feJJJ7Z670B/V7ioiBX6pgzT JWSV6hWYRqa/yGSgpGX0NfxmdbxMFES/FY6c67kcHSSnVEJBwcqwV0n+VDF3fZ0BUjMj zbgJn8vo3S4vf+QCs/c1Gfe8GQLTlpOVGQwgnYvQKCHeOn1hAGBqB7ZJZVxofyUulfch ilrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=oiRMc8r7EiKXiG9T8a9rZtctjJAl/UJbUkixVP6iM2o=; b=RjYvK7d6Kzif49qmzFy+JNnVwTx1YWV5bhpQlgS7uc/NmvDAajoTx6nRCyMmymyp2T 0PFOYzBeETmTO408z/fqnf4SAu7TbcFBnBlEJ+jxZyO8LJGpMVjX9LlgIRfRj4Vhvzjh hndM47DiqChPdCGJjkIoqEPLNcQelETv1syjfA1vt+XmaFwlptQjAZ8U7K8OstVZaspZ xz/NyV1syaZmNpITbmxIrEVVxOUErtYbwGYddSiTuXiMOfSfSx5izRR+R2s01Z5i8cxa oh2ou2Q0DFROTdw30vkk6C3frBtaocHq7s2RifNP8Y8cIkOojhSaOxgMT/I480G8lKtm Rs5Q== X-Gm-Message-State: AHQUAuaOtIuoAiZLRglDwZncd9s0g5nH+BAHzYHlEL62ZfrW2RrcyzkH 78LfkPFlSut0cQcX8bn8gjjGOQ== X-Google-Smtp-Source: APXvYqwN2Yzf76d9xAnX6NQHB7XJvIfjEMivoMGXT2/3fymwaOeeJnJNwzViG9B43zbtcnTgQcjj9A== X-Received: by 2002:a24:7d8a:: with SMTP id b132mr70517itc.66.1551284158635; Wed, 27 Feb 2019 08:15:58 -0800 (PST) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id z11sm6238817iog.29.2019.02.27.08.15.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Feb 2019 08:15:57 -0800 (PST) Received: by pryzbyj (Postfix, from userid 1000) id A0580800A28; Wed, 27 Feb 2019 10:15:56 -0600 (CST) Date: Wed, 27 Feb 2019 10:15:56 -0600 From: Justin Pryzby To: Fd Habash Cc: pgsql-performance@postgresql.org Subject: Re: What is pg_stat_user_tables Showing NULL for last_autoanalyze & last_autovacuum Message-ID: <20190227161556.GD28750@telsasoft.com> References: <5c76a2f0.1c69fb81.a4b54.6182@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5c76a2f0.1c69fb81.a4b54.6182@mx.google.com> User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Feb 27, 2019 at 09:47:13AM -0500, Fd Habash wrote: > I have been able to locate four google search results with the same inquiry. What’ve been able to understand is … > > 1. If auto-vaccum is working as expected, stats collector does not nullify these values as part of a startup sequence or regular Maitenance. If a relation gets auto[vacuumed|analyzed], the timestamps should remain. > 2. A database engine crash or restart with ‘immediate’ option will cause the timestamps to nullify. > 3. Table never qualified for vacuuming based on auto-vacuum settings. Can you give an example ? If it's an empty inheritence parent (relkind=r), then it won't trigger autovacuum/analyze thresholds (but you should analyze it manually). Note that relkind=p "partitioned" tables don't have entries at all. https://www.postgresql.org/message-id/flat/20180503141430.GA28019%40telsasoft.com If it's never DELETEd from, then it won't trigger autovacuum (but may trigger autoanalyze). Justin