Skip to content

Commit ef02fb1

Browse 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

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy