Re: Obsolete or dead serverconnections after reboot

2021-08-03 Thread Peter J. Holzer
On 2021-07-26 09:31:03 +0200, WR wrote: > Now on my Laptops the shutdown of the postgres-service works too. > > I had to switch off the "Schnellstart" (in english something like "fast > start" or "fast boot"), which can be found under Settings > System > Energy > Options > Behavior when pushing th

Re: Obsolete or dead serverconnections after reboot

2021-07-26 Thread WR
Hello Ninad Shah, Thank you for clarification. The state of the mentioned connections was "Idle" in pg_stat_activity. Now on my Laptops the shutdown of the postgres-service works too. I had to switch off the "Schnellstart" (in english something like "fast start" or "fast boot"), which can be f

Re: Obsolete or dead serverconnections after reboot

2021-07-23 Thread Ninad Shah
Just to make it clear, "idle in transaction" and "idle" are different terms. "Idle in transaction" refers to connections that are waiting for either commit or rollback. Additionally, this could be a bug as well. However, it's difficult to conclude at this stage. You may report this to postgresql-b

Re: Obsolete or dead serverconnections after reboot

2021-07-23 Thread WR
Hello, unfortunately, it's my companys choice of OS. In private life I'm riding the penguin. One last thing: I have 2 Laptops, where the shutdown doesn't work, and one VirtualBox machine where it works like a charm. Maybe it has something to do with the power management. As a workaround I se

Re: Obsolete or dead serverconnections after reboot

2021-07-22 Thread Ninad Shah
Factually, Windows itself has a number of issues. Hence, it is always suggested to use Linux with it. It can be explored further by querying the table from which pg_stat_activity gathers data. Regards, Ninad Shah On Thu, 22 Jul 2021 at 12:51, WR wrote: > Hello Ninad Shah, > > I think, nobody

Re: Obsolete or dead serverconnections after reboot

2021-07-22 Thread WR
Hello Vijaykumar Jain, it really seems that the reason for the problem is the not executed shutdown of the service. I also sent a message to EDB. Maybe they will answer although I'm not a registered customer. In some earier logfiles I can find the shutdown messages like yours, but not in all

Re: Obsolete or dead serverconnections after reboot

2021-07-22 Thread Vijaykumar Jain
On Thu, 22 Jul 2021 at 12:41, WR wrote: > Hello Vijaykumar Jain, > > at first: select pg_stat_reset(); doesn't help, the pg_stat_activity is > the same after it. > one thing, i forgot to mention. After a pg_stat_reset(), I would run, *vacuum analyze* on the dbs, so that stats are rebuilt. else q

Re: Obsolete or dead serverconnections after reboot

2021-07-22 Thread WR
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

Re: Obsolete or dead serverconnections after reboot

2021-07-22 Thread WR
Hello Ninad Shah, I think, nobody holds the connections, because the state is idle. But I'm not shure what means: the connection is idle. One interesting fact was: when I dont stop the psql commandline on the client (and dont start another query, wht ends up in a connection reset, while the

Re: Obsolete or dead serverconnections after reboot

2021-07-22 Thread WR
Hello Vijaykumar Jain, at first: select pg_stat_reset(); doesn't help, the pg_stat_activity is the same after it. I added some interesting rows after two reboots (which have been complete power cycles) artea=# select pid ,application_name , client_addr ,client_port ,backend_start ,query_st

Re: Obsolete or dead serverconnections after reboot

2021-07-21 Thread Ninad Shah
Hello, Would you be able to verify the process trees for those PIDs on Windows? You may be able to see who holds the connections? Regards, Ninad Shah On Wed, 21 Jul 2021 at 19:15, WR wrote: > Hello Vijaykumar Jain, > > thank you for fast answer, today I'm not able to access the hardware, > I'

Re: Obsolete or dead serverconnections after reboot

2021-07-21 Thread WR
Hello Vijaykumar Jain, thank you for fast answer, today I'm not able to access the hardware, I'll be back tomorrow and will do the required tests. Wolfgang 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 thi

Re: Obsolete or dead serverconnections after reboot

2021-07-21 Thread 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

Re: Obsolete or dead serverconnections after reboot

2021-07-21 Thread Vijaykumar Jain
> 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 Do you see shutdown/termination messages in the db logs or windows event logs when

Obsolete or dead serverconnections after reboot

2021-07-21 Thread WR
Hello community, actually I have a problem wit PG13 on Windows 10 (both x64), Postgres version is 13.0.2.21090 from EDB installer. I have to develop a logical replication cluster, where sometimes there happens a shutdown of one host. Logical replication works nice, thank you for that. My i