PostgresSQL 9.5.21 very slow to connect and perform basic queries

bruno da silva <brunogiovs@gmail.com>

From: bruno da silva <brunogiovs@gmail.com>
To: pgsql-performance@lists.postgresql.org
Date: 2022-07-21T18:37:35Z
Lists: pgsql-performance
Hello.

I'm investigating an issue on a PostgresSql 9.5.21 installation that
becomes unusable in an intermittent way. Simple queries like "select
now();" could take 20s. commits take 2s. and all gets fixed after an engine
restart.

I look into the pg logs and no signs of errors. and checkpoints are
always timed. The machine is well provisioned, load isn't too high, and cpu
io wait is under 1%.

any suggestions on what I should check more?


Thanks in advance.
-- 
Bruno da Silva

Commits

  1. Be more wary about 32-bit integer overflow in pg_stat_statements.