many sessions waiting DataFileRead and extend

From: James Pang <jamespang886(at)gmail(dot)com>
To: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: many sessions waiting DataFileRead and extend
Date: 2025-06-25 03:15:08
Message-ID: CAHgTRfdDkiX5bLRCYhrP18kFJjcvs1eHvL+jUtX1Ep-Y3=cFVg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-performance

pgv14, RHEL8, xfs , we suddenly see tens of sessions waiting on
"DataFileRead" and "extend", it last about 2 seconds(based on
pg_stat_activity query) , during the waiting time, "%sys" cpu increased to
80% , but from "iostat" , no high iops and io read/write latency increased
either.
many sessions were running same "DELETE FROM xxxx" in parallel waiting
on "extend" and "DataFileRead", there are triggers in this table "After
delete" to insert/delete other tables in the tigger.

time wait_event
count(sessions)
2025-06-24 18:00:11.687245+00 | DataFileFlush | 1
2025-06-24 18:00:11.687245+00 | DataFileWrite | 1
2025-06-24 18:00:11.687245+00 | PgSleep | 1
2025-06-24 18:00:11.687245+00 | DataFileExtend | 7
2025-06-24 18:00:11.687245+00 | ProcArrayGroupUpdate | 1
2025-06-24 18:00:11.687245+00 | WALWrite | 5
2025-06-24 18:00:11.687245+00 | extend | 55
2025-06-24 18:00:11.687245+00 | DataFileRead | 45
2025-06-24 18:00:11.687245+00 | DataFilePrefetch | 2

Thanks,

James

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Laurenz Albe 2025-06-25 05:59:41 Re: many sessions waiting DataFileRead and extend
Previous Message David G. Johnston 2025-06-24 14:31:12 Re: many deletes and inserts on pg_class, total rows is 14200 rows in "pg_class", any idea why so many inserts/deletes on "pg_class" it's self?