Re: many sessions waiting DataFileRead and extend

2025-06-26 Thread Robert Haas
On Thu, Jun 26, 2025 at 2:48 AM James Pang wrote: >we faced this issue 3 times this week, each time last only 2 seconds, so > not easy to run perf in peak business time to capture that, anyway, I will > try. before that, I want to understand if "os page cache" or "pg buffer > cache" can con

Re: many sessions waiting DataFileRead and extend

2025-06-26 Thread James Pang
thanks for you explaination, from Postgresql perspective, is it possible to see bgwriter,or checkpointer blocking backend process reading/wrting ? or vice versa ? Thanks, James Frits Hoogland 於 2025年6月26日週四 下午4:07寫道: > Postgres lives as a process in linux, and keeps its own cache, and tries

Re: many sessions waiting DataFileRead and extend

2025-06-26 Thread Frits Hoogland
Postgres lives as a process in linux, and keeps its own cache, and tries to use that as much as possible for data. This is postgres shared buffers, commonly called the buffer cache. For WAL, sessions write to the wal buffer (separate from the postgres buffer cache), and need to write to disk u

Re: many sessions waiting DataFileRead and extend

2025-06-26 Thread James Pang
in addition to "DataFileRead", actually we have more session waiting on "extend", and we enabled log_lock, for example 2025-06-24 18:00:11.368 :[1865315]:[4-1]:mbsLOG: process 1865315 still waiting for ExclusiveLock on extension of relation 14658239 of database 16384 after 1000.161 ms 2025-06-