LCOV - code coverage report
Current view: top level - src/backend/utils/activity - wait_event.c (source / functions) Coverage Total Hit
Test: PostgreSQL 20devel Lines: 89.5 % 152 136
Test Date: 2026-07-28 18:15:44 Functions: 100.0 % 11 11
Legend: Lines:     hit not hit
Branches: + taken - not taken # not executed
Branches: 63.6 % 55 35

             Branch data     Line data    Source code
       1                 :             : /* ----------
       2                 :             :  * wait_event.c
       3                 :             :  *    Wait event reporting infrastructure.
       4                 :             :  *
       5                 :             :  * Copyright (c) 2001-2026, PostgreSQL Global Development Group
       6                 :             :  *
       7                 :             :  *
       8                 :             :  * IDENTIFICATION
       9                 :             :  *    src/backend/utils/activity/wait_event.c
      10                 :             :  *
      11                 :             :  * NOTES
      12                 :             :  *
      13                 :             :  * To make pgstat_report_wait_start() and pgstat_report_wait_end() as
      14                 :             :  * lightweight as possible, they do not check if shared memory (MyProc
      15                 :             :  * specifically, where the wait event is stored) is already available. Instead
      16                 :             :  * we initially set my_wait_event_info to a process local variable, which then
      17                 :             :  * is redirected to shared memory using pgstat_set_wait_event_storage(). For
      18                 :             :  * the same reason pgstat_track_activities is not checked - the check adds
      19                 :             :  * more work than it saves.
      20                 :             :  *
      21                 :             :  * ----------
      22                 :             :  */
      23                 :             : #include "postgres.h"
      24                 :             : 
      25                 :             : #include "storage/lmgr.h"
      26                 :             : #include "storage/lwlock.h"
      27                 :             : #include "storage/shmem.h"
      28                 :             : #include "storage/subsystems.h"
      29                 :             : #include "utils/wait_event.h"
      30                 :             : 
      31                 :             : 
      32                 :             : static const char *pgstat_get_wait_activity(WaitEventActivity w);
      33                 :             : static const char *pgstat_get_wait_buffer(WaitEventBuffer w);
      34                 :             : static const char *pgstat_get_wait_client(WaitEventClient w);
      35                 :             : static const char *pgstat_get_wait_ipc(WaitEventIPC w);
      36                 :             : static const char *pgstat_get_wait_timeout(WaitEventTimeout w);
      37                 :             : static const char *pgstat_get_wait_io(WaitEventIO w);
      38                 :             : 
      39                 :             : 
      40                 :             : static uint32 local_my_wait_event_info;
      41                 :             : uint32     *my_wait_event_info = &local_my_wait_event_info;
      42                 :             : 
      43                 :             : #define WAIT_EVENT_CLASS_MASK   0xFF000000
      44                 :             : #define WAIT_EVENT_ID_MASK      0x0000FFFF
      45                 :             : 
      46                 :             : /*
      47                 :             :  * Hash tables for storing custom wait event ids and their names in
      48                 :             :  * shared memory.
      49                 :             :  *
      50                 :             :  * WaitEventCustomHashByInfo is used to find the name from wait event
      51                 :             :  * information.  Any backend can search it to find custom wait events.
      52                 :             :  *
      53                 :             :  * WaitEventCustomHashByName is used to find the wait event information from a
      54                 :             :  * name.  It is used to ensure that no duplicated entries are registered.
      55                 :             :  *
      56                 :             :  * For simplicity, we use the same ID counter across types of custom events.
      57                 :             :  * We could end that anytime the need arises.
      58                 :             :  *
      59                 :             :  * The size of the hash table is based on the assumption that usually only a
      60                 :             :  * handful of entries are needed, but since it's small in absolute terms
      61                 :             :  * anyway, we leave a generous amount of headroom.
      62                 :             :  */
      63                 :             : static HTAB *WaitEventCustomHashByInfo; /* find names from infos */
      64                 :             : static HTAB *WaitEventCustomHashByName; /* find infos from names */
      65                 :             : 
      66                 :             : #define WAIT_EVENT_CUSTOM_HASH_SIZE 128
      67                 :             : 
      68                 :             : /* hash table entries */
      69                 :             : typedef struct WaitEventCustomEntryByInfo
      70                 :             : {
      71                 :             :     uint32      wait_event_info;    /* hash key */
      72                 :             :     char        wait_event_name[NAMEDATALEN];   /* custom wait event name */
      73                 :             : } WaitEventCustomEntryByInfo;
      74                 :             : 
      75                 :             : typedef struct WaitEventCustomEntryByName
      76                 :             : {
      77                 :             :     char        wait_event_name[NAMEDATALEN];   /* hash key */
      78                 :             :     uint32      wait_event_info;
      79                 :             : } WaitEventCustomEntryByName;
      80                 :             : 
      81                 :             : 
      82                 :             : /* dynamic allocation counter for custom wait events */
      83                 :             : static int *WaitEventCustomCounter;
      84                 :             : 
      85                 :             : /* first event ID of custom wait events */
      86                 :             : #define WAIT_EVENT_CUSTOM_INITIAL_ID    1
      87                 :             : 
      88                 :             : static uint32 WaitEventCustomNew(uint32 classId, const char *wait_event_name);
      89                 :             : static const char *GetWaitEventCustomIdentifier(uint32 wait_event_info);
      90                 :             : 
      91                 :             : static void WaitEventCustomShmemRequest(void *arg);
      92                 :             : static void WaitEventCustomShmemInit(void *arg);
      93                 :             : 
      94                 :             : const ShmemCallbacks WaitEventCustomShmemCallbacks = {
      95                 :             :     .request_fn = WaitEventCustomShmemRequest,
      96                 :             :     .init_fn = WaitEventCustomShmemInit,
      97                 :             : };
      98                 :             : 
      99                 :             : /*
     100                 :             :  * Register shmem space for dynamic shared hash and dynamic allocation counter.
     101                 :             :  */
     102                 :             : static void
     103                 :        1260 : WaitEventCustomShmemRequest(void *arg)
     104                 :             : {
     105                 :        1260 :     ShmemRequestStruct(.name = "WaitEventCustomCounter",
     106                 :             :                        .size = sizeof(int),
     107                 :             :                        .ptr = (void **) &WaitEventCustomCounter,
     108                 :             :         );
     109                 :        1260 :     ShmemRequestHash(.name = "WaitEventCustom hash by wait event information",
     110                 :             :                      .ptr = &WaitEventCustomHashByInfo,
     111                 :             :                      .nelems = WAIT_EVENT_CUSTOM_HASH_SIZE,
     112                 :             :                      .hash_info.keysize = sizeof(uint32),
     113                 :             :                      .hash_info.entrysize = sizeof(WaitEventCustomEntryByInfo),
     114                 :             :                      .hash_flags = HASH_ELEM | HASH_BLOBS,
     115                 :             :         );
     116                 :        1260 :     ShmemRequestHash(.name = "WaitEventCustom hash by name",
     117                 :             :                      .ptr = &WaitEventCustomHashByName,
     118                 :             :                      .nelems = WAIT_EVENT_CUSTOM_HASH_SIZE,
     119                 :             :     /* key is a NULL-terminated string */
     120                 :             :                      .hash_info.keysize = sizeof(char[NAMEDATALEN]),
     121                 :             :                      .hash_info.entrysize = sizeof(WaitEventCustomEntryByName),
     122                 :             :                      .hash_flags = HASH_ELEM | HASH_STRINGS,
     123                 :             :         );
     124                 :        1260 : }
     125                 :             : 
     126                 :             : static void
     127                 :        1257 : WaitEventCustomShmemInit(void *arg)
     128                 :             : {
     129                 :             :     /* initialize the allocation counter */
     130                 :        1257 :     *WaitEventCustomCounter = WAIT_EVENT_CUSTOM_INITIAL_ID;
     131                 :        1257 : }
     132                 :             : 
     133                 :             : /*
     134                 :             :  * Allocate a new event ID and return the wait event info.
     135                 :             :  *
     136                 :             :  * If the wait event name is already defined, this does not allocate a new
     137                 :             :  * entry; it returns the wait event information associated to the name.
     138                 :             :  */
     139                 :             : uint32
     140                 :          52 : WaitEventExtensionNew(const char *wait_event_name)
     141                 :             : {
     142                 :          52 :     return WaitEventCustomNew(PG_WAIT_EXTENSION, wait_event_name);
     143                 :             : }
     144                 :             : 
     145                 :             : uint32
     146                 :          93 : WaitEventInjectionPointNew(const char *wait_event_name)
     147                 :             : {
     148                 :          93 :     return WaitEventCustomNew(PG_WAIT_INJECTIONPOINT, wait_event_name);
     149                 :             : }
     150                 :             : 
     151                 :             : static uint32
     152                 :         145 : WaitEventCustomNew(uint32 classId, const char *wait_event_name)
     153                 :             : {
     154                 :             :     uint16      eventId;
     155                 :             :     bool        found;
     156                 :             :     WaitEventCustomEntryByName *entry_by_name;
     157                 :             :     WaitEventCustomEntryByInfo *entry_by_info;
     158                 :             :     uint32      wait_event_info;
     159                 :             : 
     160                 :             :     /* Check the limit of the length of the event name */
     161         [ -  + ]:         145 :     if (strlen(wait_event_name) >= NAMEDATALEN)
     162         [ #  # ]:           0 :         elog(ERROR,
     163                 :             :              "cannot use custom wait event string longer than %u characters",
     164                 :             :              NAMEDATALEN - 1);
     165                 :             : 
     166                 :             :     /*
     167                 :             :      * Check if the wait event info associated to the name is already defined,
     168                 :             :      * and return it if so.
     169                 :             :      */
     170                 :         145 :     LWLockAcquire(WaitEventCustomLock, LW_SHARED);
     171                 :             :     entry_by_name = (WaitEventCustomEntryByName *)
     172                 :         145 :         hash_search(WaitEventCustomHashByName, wait_event_name,
     173                 :             :                     HASH_FIND, &found);
     174                 :         145 :     LWLockRelease(WaitEventCustomLock);
     175         [ +  + ]:         145 :     if (found)
     176                 :             :     {
     177                 :             :         uint32      oldClassId;
     178                 :             : 
     179                 :          89 :         oldClassId = entry_by_name->wait_event_info & WAIT_EVENT_CLASS_MASK;
     180         [ -  + ]:          89 :         if (oldClassId != classId)
     181         [ #  # ]:           0 :             ereport(ERROR,
     182                 :             :                     (errcode(ERRCODE_DUPLICATE_OBJECT),
     183                 :             :                      errmsg("wait event \"%s\" already exists in type \"%s\"",
     184                 :             :                             wait_event_name,
     185                 :             :                             pgstat_get_wait_event_type(entry_by_name->wait_event_info))));
     186                 :          89 :         return entry_by_name->wait_event_info;
     187                 :             :     }
     188                 :             : 
     189                 :             :     /*
     190                 :             :      * Allocate and register a new wait event.  Recheck if the event name
     191                 :             :      * exists, as it could be possible that a concurrent process has inserted
     192                 :             :      * one with the same name since the LWLock acquired again here was
     193                 :             :      * previously released.
     194                 :             :      */
     195                 :          56 :     LWLockAcquire(WaitEventCustomLock, LW_EXCLUSIVE);
     196                 :             :     entry_by_name = (WaitEventCustomEntryByName *)
     197                 :          56 :         hash_search(WaitEventCustomHashByName, wait_event_name,
     198                 :             :                     HASH_FIND, &found);
     199         [ -  + ]:          56 :     if (found)
     200                 :             :     {
     201                 :             :         uint32      oldClassId;
     202                 :             : 
     203                 :           0 :         LWLockRelease(WaitEventCustomLock);
     204                 :           0 :         oldClassId = entry_by_name->wait_event_info & WAIT_EVENT_CLASS_MASK;
     205         [ #  # ]:           0 :         if (oldClassId != classId)
     206         [ #  # ]:           0 :             ereport(ERROR,
     207                 :             :                     (errcode(ERRCODE_DUPLICATE_OBJECT),
     208                 :             :                      errmsg("wait event \"%s\" already exists in type \"%s\"",
     209                 :             :                             wait_event_name,
     210                 :             :                             pgstat_get_wait_event_type(entry_by_name->wait_event_info))));
     211                 :           0 :         return entry_by_name->wait_event_info;
     212                 :             :     }
     213                 :             : 
     214                 :             :     /* Allocate a new event Id */
     215         [ -  + ]:          56 :     if (*WaitEventCustomCounter >= WAIT_EVENT_CUSTOM_HASH_SIZE)
     216         [ #  # ]:           0 :         ereport(ERROR,
     217                 :             :                 errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
     218                 :             :                 errmsg("too many custom wait events"));
     219                 :             : 
     220                 :          56 :     eventId = (*WaitEventCustomCounter)++;
     221                 :             : 
     222                 :             :     /* Register the new wait event */
     223                 :          56 :     wait_event_info = classId | eventId;
     224                 :             :     entry_by_info = (WaitEventCustomEntryByInfo *)
     225                 :          56 :         hash_search(WaitEventCustomHashByInfo, &wait_event_info,
     226                 :             :                     HASH_ENTER, &found);
     227                 :             :     Assert(!found);
     228                 :          56 :     strlcpy(entry_by_info->wait_event_name, wait_event_name,
     229                 :             :             sizeof(entry_by_info->wait_event_name));
     230                 :             : 
     231                 :             :     entry_by_name = (WaitEventCustomEntryByName *)
     232                 :          56 :         hash_search(WaitEventCustomHashByName, wait_event_name,
     233                 :             :                     HASH_ENTER, &found);
     234                 :             :     Assert(!found);
     235                 :          56 :     entry_by_name->wait_event_info = wait_event_info;
     236                 :             : 
     237                 :          56 :     LWLockRelease(WaitEventCustomLock);
     238                 :             : 
     239                 :          56 :     return wait_event_info;
     240                 :             : }
     241                 :             : 
     242                 :             : /*
     243                 :             :  * Return the name of a custom wait event information.
     244                 :             :  */
     245                 :             : static const char *
     246                 :         160 : GetWaitEventCustomIdentifier(uint32 wait_event_info)
     247                 :             : {
     248                 :             :     bool        found;
     249                 :             :     WaitEventCustomEntryByInfo *entry;
     250                 :             : 
     251                 :             :     /* Built-in event? */
     252         [ -  + ]:         160 :     if (wait_event_info == PG_WAIT_EXTENSION)
     253                 :           0 :         return "Extension";
     254                 :             : 
     255                 :             :     /* It is a user-defined wait event, so lookup hash table. */
     256                 :         160 :     LWLockAcquire(WaitEventCustomLock, LW_SHARED);
     257                 :             :     entry = (WaitEventCustomEntryByInfo *)
     258                 :         160 :         hash_search(WaitEventCustomHashByInfo, &wait_event_info,
     259                 :             :                     HASH_FIND, &found);
     260                 :         160 :     LWLockRelease(WaitEventCustomLock);
     261                 :             : 
     262         [ -  + ]:         160 :     if (!entry)
     263         [ #  # ]:           0 :         elog(ERROR,
     264                 :             :              "could not find custom name for wait event information %u",
     265                 :             :              wait_event_info);
     266                 :             : 
     267                 :         160 :     return entry->wait_event_name;
     268                 :             : }
     269                 :             : 
     270                 :             : 
     271                 :             : /*
     272                 :             :  * Returns a list of currently defined custom wait event names.  The result is
     273                 :             :  * a palloc'd array, with the number of elements saved in *nwaitevents.
     274                 :             :  */
     275                 :             : char      **
     276                 :          10 : GetWaitEventCustomNames(uint32 classId, int *nwaitevents)
     277                 :             : {
     278                 :             :     char      **waiteventnames;
     279                 :             :     WaitEventCustomEntryByName *hentry;
     280                 :             :     HASH_SEQ_STATUS hash_seq;
     281                 :             :     int         index;
     282                 :             :     int         els;
     283                 :             : 
     284                 :          10 :     LWLockAcquire(WaitEventCustomLock, LW_SHARED);
     285                 :             : 
     286                 :             :     /* Now we can safely count the number of entries */
     287                 :          10 :     els = hash_get_num_entries(WaitEventCustomHashByName);
     288                 :             : 
     289                 :             :     /* Allocate enough space for all entries */
     290                 :          10 :     waiteventnames = palloc_array(char *, els);
     291                 :             : 
     292                 :             :     /* Now scan the hash table to copy the data */
     293                 :          10 :     hash_seq_init(&hash_seq, WaitEventCustomHashByName);
     294                 :             : 
     295                 :          10 :     index = 0;
     296         [ +  + ]:          12 :     while ((hentry = (WaitEventCustomEntryByName *) hash_seq_search(&hash_seq)) != NULL)
     297                 :             :     {
     298         [ +  + ]:           2 :         if ((hentry->wait_event_info & WAIT_EVENT_CLASS_MASK) != classId)
     299                 :           1 :             continue;
     300                 :           1 :         waiteventnames[index] = pstrdup(hentry->wait_event_name);
     301                 :           1 :         index++;
     302                 :             :     }
     303                 :             : 
     304                 :          10 :     LWLockRelease(WaitEventCustomLock);
     305                 :             : 
     306                 :          10 :     *nwaitevents = index;
     307                 :          10 :     return waiteventnames;
     308                 :             : }
     309                 :             : 
     310                 :             : /*
     311                 :             :  * Configure wait event reporting to report wait events to *wait_event_info.
     312                 :             :  * *wait_event_info needs to be valid until pgstat_reset_wait_event_storage()
     313                 :             :  * is called.
     314                 :             :  *
     315                 :             :  * Expected to be called during backend startup, to point my_wait_event_info
     316                 :             :  * into shared memory.
     317                 :             :  */
     318                 :             : void
     319                 :       24869 : pgstat_set_wait_event_storage(uint32 *wait_event_info)
     320                 :             : {
     321                 :       24869 :     my_wait_event_info = wait_event_info;
     322                 :       24869 : }
     323                 :             : 
     324                 :             : /*
     325                 :             :  * Reset wait event storage location.
     326                 :             :  *
     327                 :             :  * Expected to be called during backend shutdown, before the location set up
     328                 :             :  * pgstat_set_wait_event_storage() becomes invalid.
     329                 :             :  */
     330                 :             : void
     331                 :       24869 : pgstat_reset_wait_event_storage(void)
     332                 :             : {
     333                 :       24869 :     my_wait_event_info = &local_my_wait_event_info;
     334                 :       24869 : }
     335                 :             : 
     336                 :             : /* ----------
     337                 :             :  * pgstat_get_wait_event_type() -
     338                 :             :  *
     339                 :             :  *  Return a string representing the current wait event type, backend is
     340                 :             :  *  waiting on.
     341                 :             :  */
     342                 :             : const char *
     343                 :        9143 : pgstat_get_wait_event_type(uint32 wait_event_info)
     344                 :             : {
     345                 :             :     uint32      classId;
     346                 :             :     const char *event_type;
     347                 :             : 
     348                 :             :     /* report process as not waiting. */
     349         [ +  + ]:        9143 :     if (wait_event_info == 0)
     350                 :        1124 :         return NULL;
     351                 :             : 
     352                 :        8019 :     classId = wait_event_info & WAIT_EVENT_CLASS_MASK;
     353                 :             : 
     354   [ +  +  +  +  :        8019 :     switch (classId)
          +  +  +  +  +  
                   +  - ]
     355                 :             :     {
     356                 :          19 :         case PG_WAIT_LWLOCK:
     357                 :          19 :             event_type = "LWLock";
     358                 :          19 :             break;
     359                 :        1287 :         case PG_WAIT_LOCK:
     360                 :        1287 :             event_type = "Lock";
     361                 :        1287 :             break;
     362                 :           5 :         case PG_WAIT_BUFFER:
     363                 :           5 :             event_type = "Buffer";
     364                 :           5 :             break;
     365                 :        5384 :         case PG_WAIT_ACTIVITY:
     366                 :        5384 :             event_type = "Activity";
     367                 :        5384 :             break;
     368                 :         751 :         case PG_WAIT_CLIENT:
     369                 :         751 :             event_type = "Client";
     370                 :         751 :             break;
     371                 :          47 :         case PG_WAIT_EXTENSION:
     372                 :          47 :             event_type = "Extension";
     373                 :          47 :             break;
     374                 :         179 :         case PG_WAIT_IPC:
     375                 :         179 :             event_type = "IPC";
     376                 :         179 :             break;
     377                 :          24 :         case PG_WAIT_TIMEOUT:
     378                 :          24 :             event_type = "Timeout";
     379                 :          24 :             break;
     380                 :          66 :         case PG_WAIT_IO:
     381                 :          66 :             event_type = "IO";
     382                 :          66 :             break;
     383                 :         257 :         case PG_WAIT_INJECTIONPOINT:
     384                 :         257 :             event_type = "InjectionPoint";
     385                 :         257 :             break;
     386                 :           0 :         default:
     387                 :           0 :             event_type = "???";
     388                 :           0 :             break;
     389                 :             :     }
     390                 :             : 
     391                 :        8019 :     return event_type;
     392                 :             : }
     393                 :             : 
     394                 :             : /* ----------
     395                 :             :  * pgstat_get_wait_event() -
     396                 :             :  *
     397                 :             :  *  Return a string representing the current wait event, backend is
     398                 :             :  *  waiting on.
     399                 :             :  */
     400                 :             : const char *
     401                 :        7309 : pgstat_get_wait_event(uint32 wait_event_info)
     402                 :             : {
     403                 :             :     uint32      classId;
     404                 :             :     uint16      eventId;
     405                 :             :     const char *event_name;
     406                 :             : 
     407                 :             :     /* report process as not waiting. */
     408         [ +  + ]:        7309 :     if (wait_event_info == 0)
     409                 :         885 :         return NULL;
     410                 :             : 
     411                 :        6424 :     classId = wait_event_info & WAIT_EVENT_CLASS_MASK;
     412                 :        6424 :     eventId = wait_event_info & WAIT_EVENT_ID_MASK;
     413                 :             : 
     414   [ +  +  +  +  :        6424 :     switch (classId)
          +  +  +  +  +  
                      - ]
     415                 :             :     {
     416                 :          19 :         case PG_WAIT_LWLOCK:
     417                 :          19 :             event_name = GetLWLockIdentifier(classId, eventId);
     418                 :          19 :             break;
     419                 :          14 :         case PG_WAIT_LOCK:
     420                 :          14 :             event_name = GetLockNameFromTagType(eventId);
     421                 :          14 :             break;
     422                 :         160 :         case PG_WAIT_EXTENSION:
     423                 :             :         case PG_WAIT_INJECTIONPOINT:
     424                 :         160 :             event_name = GetWaitEventCustomIdentifier(wait_event_info);
     425                 :         160 :             break;
     426                 :           5 :         case PG_WAIT_BUFFER:
     427                 :             :             {
     428                 :           5 :                 WaitEventBuffer w = (WaitEventBuffer) wait_event_info;
     429                 :             : 
     430                 :           5 :                 event_name = pgstat_get_wait_buffer(w);
     431                 :           5 :                 break;
     432                 :             :             }
     433                 :        5384 :         case PG_WAIT_ACTIVITY:
     434                 :             :             {
     435                 :        5384 :                 WaitEventActivity w = (WaitEventActivity) wait_event_info;
     436                 :             : 
     437                 :        5384 :                 event_name = pgstat_get_wait_activity(w);
     438                 :        5384 :                 break;
     439                 :             :             }
     440                 :         747 :         case PG_WAIT_CLIENT:
     441                 :             :             {
     442                 :         747 :                 WaitEventClient w = (WaitEventClient) wait_event_info;
     443                 :             : 
     444                 :         747 :                 event_name = pgstat_get_wait_client(w);
     445                 :         747 :                 break;
     446                 :             :             }
     447                 :          49 :         case PG_WAIT_IPC:
     448                 :             :             {
     449                 :          49 :                 WaitEventIPC w = (WaitEventIPC) wait_event_info;
     450                 :             : 
     451                 :          49 :                 event_name = pgstat_get_wait_ipc(w);
     452                 :          49 :                 break;
     453                 :             :             }
     454                 :          24 :         case PG_WAIT_TIMEOUT:
     455                 :             :             {
     456                 :          24 :                 WaitEventTimeout w = (WaitEventTimeout) wait_event_info;
     457                 :             : 
     458                 :          24 :                 event_name = pgstat_get_wait_timeout(w);
     459                 :          24 :                 break;
     460                 :             :             }
     461                 :          22 :         case PG_WAIT_IO:
     462                 :             :             {
     463                 :          22 :                 WaitEventIO w = (WaitEventIO) wait_event_info;
     464                 :             : 
     465                 :          22 :                 event_name = pgstat_get_wait_io(w);
     466                 :          22 :                 break;
     467                 :             :             }
     468                 :           0 :         default:
     469                 :           0 :             event_name = "unknown wait event";
     470                 :           0 :             break;
     471                 :             :     }
     472                 :             : 
     473                 :        6424 :     return event_name;
     474                 :             : }
     475                 :             : 
     476                 :             : #include "utils/pgstat_wait_event.c"
        

Generated by: LCOV version 2.0-1