Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fEGQi-0007kS-HB for pgsql-general@arkaria.postgresql.org; Thu, 03 May 2018 15:46:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fEGQd-0006a9-Mu for pgsql-general@arkaria.postgresql.org; Thu, 03 May 2018 15:45:55 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fEGQd-0006Zz-7P for pgsql-general@lists.postgresql.org; Thu, 03 May 2018 15:45:55 +0000 Received: from mail-it0-x229.google.com ([2607:f8b0:4001:c0b::229]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fEGQV-0005DV-QM for pgsql-general@postgresql.org; Thu, 03 May 2018 15:45:53 +0000 Received: by mail-it0-x229.google.com with SMTP id i136-v6so13499285ita.2 for ; Thu, 03 May 2018 08:45:47 -0700 (PDT) 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:in-reply-to:user-agent; bh=PllIXa9An1+ZLkzfUeXtbkFJ9pVk3M339L7YGCc/w2k=; b=Xw/HKW32KGCMuoZQyjI44Y/4XUgP8IWOz3I0Ll4q+RhQvISOGYB8oJF3AkItMJ5l9B aqLUlSej5asxBlLcfQcZSDxswfddTy8AZcKIlKzYGqAAg78+0fSlx5PH6XfyC9yYmyjU TDlAHvmsstlPbxTviv76ndSyY7iDyq3WrN5AgAq3UkzEnuvbiOUZRoZkYRdlCC9oH3YZ 4/DWIN/k7kL49cVimUIhDtPMjsE8ZSlmmPkPhvNNWyTXM0FgLh9cXnVFXShHgsXzvBpg oAoXZS62PjoQEc4OHiek/7GOW3RZPu9rfm3Q0m6F8BK+el71yyJ8+UU+UYQtSi12/xkZ +EaQ== 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:in-reply-to:user-agent; bh=PllIXa9An1+ZLkzfUeXtbkFJ9pVk3M339L7YGCc/w2k=; b=LfFb0J9DFawj2Ybuhi6HRtAQzw7xeZ19PF4PWAbQS/aXUlKUKAzn/dbY1w7dwr2+Nc 2H9PCKkOTDyoLylHPtVw1UJgckaXcKFwaQ/R0K8wp1OCvSeog9eJL8vxHmiEKUVqXNKb n5MNP3zEtQvRxNbMn43iUrJvsgsQxppLno6wohBnXQaNg9jsqN68Lpqr4yH2Cdk6eQPm cPKb0wKsDQRDWB/H6aWkkHsfs4P6U+rEAR+tJByDfRer/2xzFZSN0mU5+xHPYakdjp6Z SUD3XV1g0UgPKSMtiPf2Gubvd1VgGO5Uo39cN+gTEbQT1hEZMlDrWUdRzsGd9wvyL3dV q6/g== X-Gm-Message-State: ALKqPweIpJ+nFdyySWvPAiYp+SVT7cc9q0lTuoTPYcZdcacbanCPrLeu 99dNJlz+qz7A3osMB08WgwpjQyaOJ/I= X-Google-Smtp-Source: AB8JxZrWa5QnNn3rdcXWtZ58f52xZQdpc6Fw05A1GJC/QV5hgcdEsPzcR/MXvMbJw/RIjrFSnnbZ5g== X-Received: by 2002:a24:dc82:: with SMTP id q124-v6mr1417163itg.43.1525362346509; Thu, 03 May 2018 08:45:46 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id n89-v6sm6949417ioo.45.2018.05.03.08.45.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 May 2018 08:45:46 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id 3F819800E1C; Thu, 3 May 2018 10:45:45 -0500 (CDT) Date: Thu, 3 May 2018 10:45:45 -0500 From: Justin Pryzby To: Adrian Klaver Cc: pgsql-general@postgresql.org Subject: Re: relkind='p' has no pg_stat_user_tables Message-ID: <20180503154545.GG9585@telsasoft.com> References: <20180503141430.GA28019@telsasoft.com> <5e1e8ccf-da3d-5277-df77-a2bbaa714592@aklaver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5e1e8ccf-da3d-5277-df77-a2bbaa714592@aklaver.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 Thu, May 03, 2018 at 07:44:24AM -0700, Adrian Klaver wrote: > On 05/03/2018 07:14 AM, Justin Pryzby wrote: > >I (finally) realized that my script for ANALYZEing parents of table hierarchies > >every month or so was looping around the same parent tables every night due to > >no stats for date of last last analysis. > > Would help to see the script. I reproduced it more simply than the 300 line script: postgres=# CREATE TABLE t(i int)PARTITION BY RANGE(i); postgres=# CREATE TABLE t1 PARTITION OF t FOR VALUES FROM (1) TO (9); postgres=# INSERT INTO t1 VALUES(1),(2); postgres=# ANALYZE VERBOSE t; postgres=# SELECT * FROM pg_stat_user_tables WHERE relname='t'; (0 rows) postgres=# SELECT 1 FROM pg_statistic WHERE starelid='t'::regclass; ?column? | 1 Justin