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

Appearance settings

Commit ef02fb1

Browse filesBrowse files
committed
Report time spent in posix_fallocate() as a wait event.
When allocating DSM segments with posix_fallocate() on Linux (see commit 899bd78), report this activity as a wait event exactly as we would if we were using file-backed DSM rather than shm_open()-backed DSM. Author: Thomas Munro Discussion: https://postgr.es/m/CA%2BhUKGKCSh4GARZrJrQZwqs5SYp0xDMRr9Bvb%2BHQzJKvRgL6ZA%40mail.gmail.com
1 parent d061ea2 commit ef02fb1
Copy full SHA for ef02fb1

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: src/backend/storage/ipc/dsm_impl.c
+2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.