pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Database Stats getting reset after server restart
4+ messages / 3 participants
[nested] [flat]

* Database Stats getting reset after server restart
@ 2020-08-17 08:25  Sujith Kumar.S <sujiplr@gmail.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Sujith Kumar.S @ 2020-08-17 08:25 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

Hi Team,

After the postgresql server restart, the details on the pg_stat_all_tables
are showing as zero. Does that mean the stats data also gets reset after
the server restart ? How can we prevent this from happening?

Regards,
Sujith Kumar.S

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Database Stats getting reset after server restart
@ 2020-08-17 08:38  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Sujith Kumar.S <sujiplr@gmail.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Laurenz Albe @ 2020-08-17 08:38 UTC (permalink / raw)
  To: Sujith Kumar.S <sujiplr@gmail.com>; pgsql-admin@lists.postgresql.org

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






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Database Stats getting reset after server restart
@ 2020-08-17 09:52  Sujith Kumar.S <sujiplr@gmail.com>
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 0 replies; 4+ messages in thread

From: Sujith Kumar.S @ 2020-08-17 09:52 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: pgsql-admin@lists.postgresql.org

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

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Database Stats getting reset after server restart
@ 2020-08-17 12:35  dbatoCloud Solution <dbatocloud17@gmail.com>
  parent: Sujith Kumar.S <sujiplr@gmail.com>
  1 sibling, 0 replies; 4+ messages in thread

From: dbatoCloud Solution @ 2020-08-17 12:35 UTC (permalink / raw)
  To: Sujith Kumar.S <sujiplr@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org

Hi Sujith

Did you set the vacuum parameter on this table automatically?



Thanks & Best Wishes,

Ashok



---------------------------------------------------------------------------------------------------------------------

Ashokkumar Mani  *(OCP**12c/11g/10g/9i**, AWS SAA, M103)*

*UAE*: Faud Al sajwani building , clock Tower , Musallah, Sharjah

M: *+971 54 723 0075 *| A.M.* +971 50 217 9910*

W: http://dbatocloudsolution.blogspot.in/ | E: dbatocloud17@gmail.com


On Mon, Aug 17, 2020 at 12:25 PM Sujith Kumar.S <sujiplr@gmail.com> wrote:

> Hi Team,
>
> After the postgresql server restart, the details on the pg_stat_all_tables
> are showing as zero. Does that mean the stats data also gets reset after
> the server restart ? How can we prevent this from happening?
>
> Regards,
> Sujith Kumar.S
>
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2020-08-17 12:35 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-08-17 08:25 Database Stats getting reset after server restart Sujith Kumar.S <sujiplr@gmail.com>
2020-08-17 08:38 ` Laurenz Albe <laurenz.albe@cybertec.at>
2020-08-17 09:52   ` Sujith Kumar.S <sujiplr@gmail.com>
2020-08-17 12:35 ` dbatoCloud Solution <dbatocloud17@gmail.com>

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