Re: Obsolete or dead serverconnections after reboot

From: WR <wolle321(at)freenet(dot)de>
To: Vijaykumar Jain <vijaykumarjain(dot)github(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Obsolete or dead serverconnections after reboot
Date: 2021-07-22 08:02:23
Message-ID: 56345246-cd10-4b99-111f-46f4d48306a1@freenet.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I also looked for the shutdown mode:

since there is no -m parameter in the commandline for starting the
windows-postgres-service, the shutdown mode seems to be the default:
fast

Am 21.07.2021 um 15:14 schrieb Vijaykumar Jain:
> select pg_stat_reset();
>
> Can you run above function, to check if stats are reset and things are
> fine without a pg restart?
> I not able to understand how new connection stats are added, along with
> old stale states, if I assume stats collector process is having issues ,
> or the stats folder is corrupt etc.
> That would also mean, all table stats would be off or not updated too?
> Is that so? Or analyse works fine on tables without a restart?
>
> On Wed, Jul 21, 2021, 6:27 PM Vijaykumar Jain
> <vijaykumarjain(dot)github(at)gmail(dot)com
> <mailto:vijaykumarjain(dot)github(at)gmail(dot)com>> wrote:
>
>
>
> Is there a way to avoid this (without restarting the service
> after every
> reboot). Is this a bug or a normal behavior?
>
>
> I have less knowledge of windows.
> https://www.enterprisedb.com/blog/postgresql-shutdown
> <https://www.enterprisedb.com/blog/postgresql-shutdown>
>
>
>
> Do you see shutdown/termination messages in the db logs or windows
> event logs when the machine is rebooted?
>
> You get the same pid and query, does it also has the same age( time
> since it started),
> I mean is the stats table updated with new data for stale
> connections or they remain static.
>
> Do you see the same issue when the machine is power cycled.
>
> Maybe windows might be preserving the memory state on disk and
> reading it back on reboot (like sleep) unless there are instructions
> to shutdown the db server on reboot. Idk.
>
> What are the state of the connections in pg_stat_activity abd
> process explorer before and after reboot. The sockets exists and
> active,  or are residual in pg stats only.
>
>

--
May the source be with you

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vijaykumar Jain 2021-07-22 09:04:35 Re: Obsolete or dead serverconnections after reboot
Previous Message WR 2021-07-22 07:21:23 Re: Obsolete or dead serverconnections after reboot