Re: Database Stalls

2023-02-03 Thread Craig Jackson
Consider creating a pg_stat_activity history table. This would allow you to look back at the time of incident and verify if any unusual activity was occurring in the database. Something like: CREATE TABLE pg_stat_activity_hist ASSELECT now() AS sample_time, a.*FROM pg_stat_activity a W

Re: Database Stalls

2023-01-30 Thread Mok
Hi, Unfortunately there is no pg_stat_activity data available as we are unaware of the issue until it has already happened. The version we are on is 12.11. I don't think it is due to locks as there are none in the logs. Vacuums are logged also and none occur before or after this event. Checkpoin

Re: Database Stalls

2023-01-30 Thread Shiv Iyer
Hi Burmokh, Please take a look at this article copied below and ping me for further guidance. Thanks! How expensive SQLs can impact PostgreSQL Performance? - https://minervadb.xyz/how-expensive-sqls-can-impact-postgresql-performance/ — Best Shiv > On 30-Jan-2023, at 11:17 PM, Mok wrot

Re: Database Stalls

2023-01-30 Thread José Arthur Benetasso Villanova
On Mon, Jan 30, 2023 at 2:51 PM Justin Pryzby wrote: > On Mon, Jan 30, 2023 at 05:47:49PM +, Mok wrote: > > Hi, > > > > We've started to observe instances of one of our databases stalling for a > > few seconds. > > > > We see a spike in wal write locks then nothing for a few seconds. After >

Re: Database Stalls

2023-01-30 Thread Justin Pryzby
On Mon, Jan 30, 2023 at 05:47:49PM +, Mok wrote: > Hi, > > We've started to observe instances of one of our databases stalling for a > few seconds. > > We see a spike in wal write locks then nothing for a few seconds. After > which we have spike latency as processes waiting to get to the db c