[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-admin
Subject:    Re: Database Stats getting reset after server restart
From:       "Sujith Kumar.S" <sujiplr () gmail ! com>
Date:       2020-08-17 9:53:11
Message-ID: CACqrAMDjL+SLmP-bjRnkxPCvx4zDCtiGmumxPLP139bKfM1SxQ () mail ! gmail ! com
[Download RAW message or body]

Yes, it's a force restart of the server. Is there any option to avoid the
stats data loss after an unexpected shutdown and recovery process.

On Mon, Aug 17, 2020, 14:08 Laurenz Albe <laurenz.albe@cybertec.at> wrote:

> 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
>
>

[Attachment #3 (text/html)]

<div dir="auto">Yes, it&#39;s a force restart of the server. Is there any option to \
avoid the stats data loss after an unexpected shutdown and recovery \
process.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, \
Aug 17, 2020, 14:08 Laurenz Albe &lt;<a \
href="mailto:laurenz.albe@cybertec.at">laurenz.albe@cybertec.at</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, 2020-08-17 at 03:25 -0500, \
Sujith Kumar.S wrote:<br> &gt; After the postgresql server restart, the details on \
the pg_stat_all_tables are showing as zero.<br> <br>
That would indicate that you didn&#39;t shut down PostgreSQL cleanly.<br>
<br>
<a href="https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-STATS-SETUP" \
rel="noreferrer noreferrer" \
target="_blank">https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-STATS-SETUP</a><br>
 &gt; When recovery is performed at server start (e.g. after immediate shutdown, \
server crash,<br> &gt; and point-in-time recovery), all statistics counters are \
reset.<br> <br>
Consult the PostgreSQL log file for confirmation.<br>
<br>
Yours,<br>
Laurenz Albe<br>
<br>
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic