Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitef02fb1

Browse files
committed
Report time spent in posix_fallocate() as a wait event.
When allocating DSM segments with posix_fallocate() on Linux (see commit899bd78), report this activity as a wait event exactly as we would ifwe were using file-backed DSM rather than shm_open()-backed DSM.Author: Thomas MunroDiscussion:https://postgr.es/m/CA%2BhUKGKCSh4GARZrJrQZwqs5SYp0xDMRr9Bvb%2BHQzJKvRgL6ZA%40mail.gmail.com
1 parentd061ea2 commitef02fb1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎src/backend/storage/ipc/dsm_impl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,12 @@ dsm_impl_posix_resize(int fd, off_t size)
371371
* interrupt pending. This avoids the possibility of looping forever
372372
* if another backend is repeatedly trying to interrupt us.
373373
*/
374+
pgstat_report_wait_start(WAIT_EVENT_DSM_FILL_ZERO_WRITE);
374375
do
375376
{
376377
rc=posix_fallocate(fd,0,size);
377378
}while (rc==EINTR&& !(ProcDiePending||QueryCancelPending));
379+
pgstat_report_wait_end();
378380

379381
/*
380382
* The caller expects errno to be set, but posix_fallocate() doesn't

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp