Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k7ael-0001UV-08 for pgsql-admin@arkaria.postgresql.org; Mon, 17 Aug 2020 08:38:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k7aej-0001T3-VG for pgsql-admin@arkaria.postgresql.org; Mon, 17 Aug 2020 08:38:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k7aej-0001Ss-LB for pgsql-admin@lists.postgresql.org; Mon, 17 Aug 2020 08:38:13 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k7aeh-0003KE-0b for pgsql-admin@lists.postgresql.org; Mon, 17 Aug 2020 08:38:12 +0000 Received: by mail-wm1-x341.google.com with SMTP id 3so13199614wmi.1 for ; Mon, 17 Aug 2020 01:38:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=YfGStBYy38E2Fb1v1luiHR8z56ZMBJmG1QMYiFq1X9A=; b=ljEXXf8Y/8ddrCWqTkblO+fML/0574WLVvutu0W6v5ZMpWPU6s766FWiWGID8LAGXj AkwoGddVmKtMwEPd3qC6OwGz07NrWgpMyiMGlm9B6G++Aj2sWvSwK9tvO3fIhcsgfTa0 O/HR0/gTltMp4ZGSbBmzEEP5XjrySiTcmfNeX36S/VpJ9uIJ94d60MxrmnStSbiBpcqA 8WfIMiU6J74vEY2dnZSd+7jH8wQHOS0BRkv3ds7BEqU9VOi3riZpL744s1Rip/sbq82u 0U0Pf8MECNDGi+sO/3Nva66eIEmvdVwB/wCNyUXPILztv1Nnj4UiI/C/Ed6MFalRTXDH dC+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=YfGStBYy38E2Fb1v1luiHR8z56ZMBJmG1QMYiFq1X9A=; b=G5abBMIeQoPtW56Ln0nyvK7ZPzodUFASi4NxuKZc/CKxFaUuEIiE4wlsCOq0jovpns TPk1lugVIKJ3qtZsnk9BRcWivAqVlrExgANKjxHFWdoj8ao4x0GP+ivH4aFr9z/6UEKC MfXdKW1htOmyAsMvVQhf8QA0ciQHEr+4tYgKvhcuIvsLYIKJ8a0C23VvYMHji2ai+xd3 JWeHhYKdP5ZcR4gv8uGH0Tl2VtHt50ZzogdqQZGkEAMoBgLPZx8l40esXXaA5fcEmBrQ nhHcpTTWvCTS67jBqJR3ML2R4ZAz42I4xFs1UE2M8Fk6CGoKVLMfeIVNWN78bBQ7GEKv bZrA== X-Gm-Message-State: AOAM532LKTb9m1q3LcWSVWAC+TG8JJI6k6QOS4U5CAeOnLCM9/c9EIMF 6WzUpAa/+bFHBDM9oKaA0U1TFA== X-Google-Smtp-Source: ABdhPJz6y/2B9fQpZyo+I51cdbs6jzJBaZUArOlIHPi1VHBqc+CvqhFf3tzDiddX8CMZmfKugdNVNA== X-Received: by 2002:a7b:cf3a:: with SMTP id m26mr14443493wmg.25.1597653489226; Mon, 17 Aug 2020 01:38:09 -0700 (PDT) Received: from localhost.localdomain ([212.186.219.234]) by smtp.gmail.com with ESMTPSA id n24sm28055827wmi.36.2020.08.17.01.38.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:38:08 -0700 (PDT) Message-ID: <7692b845b77aaf4ebeb85bde6b781e356925dd21.camel@cybertec.at> Subject: Re: Database Stats getting reset after server restart From: Laurenz Albe To: "Sujith Kumar.S" , pgsql-admin@lists.postgresql.org Date: Mon, 17 Aug 2020 10:38:08 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, 2020-08-17 at 03:25 -0500, Sujith Kumar.S wrote: > After the postgresql server restart, the details on the pg_stat_all_tables are showing as zero. That would indicate that you didn't shut down PostgreSQL cleanly. https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-STATS-SETUP > When recovery is performed at server start (e.g. after immediate shutdown, server crash, > and point-in-time recovery), all statistics counters are reset. Consult the PostgreSQL log file for confirmation. Yours, Laurenz Albe