diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/monitoring.sgml | 12 | ||||
-rw-r--r-- | doc/src/sgml/xfunc.sgml | 4 |
2 files changed, 14 insertions, 2 deletions
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index b2ad9b446f3..991f6299075 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -1064,6 +1064,14 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </entry> </row> <row> + <entry><literal>InjectionPoint</literal></entry> + <entry>The server process is waiting for an injection point to reach an + outcome defined in a test. See + <xref linkend="xfunc-addin-injection-points"/> for more details. This + type has no predefined wait points. + </entry> + </row> + <row> <entry><literal>IO</literal></entry> <entry>The server process is waiting for an I/O operation to complete. <literal>wait_event</literal> will identify the specific wait point; @@ -1139,8 +1147,8 @@ description | Waiting for a newly initialized WAL file to reach durable storage <note> <para> - Extensions can add <literal>Extension</literal> and - <literal>LWLock</literal> events + Extensions can add <literal>Extension</literal>, + <literal>InjectionPoint</literal>. and <literal>LWLock</literal> events to the lists shown in <xref linkend="wait-event-extension-table"/> and <xref linkend="wait-event-lwlock-table"/>. In some cases, the name of an <literal>LWLock</literal> assigned by an extension will not be diff --git a/doc/src/sgml/xfunc.sgml b/doc/src/sgml/xfunc.sgml index 1d0b65193e3..f3a3e4e2f8f 100644 --- a/doc/src/sgml/xfunc.sgml +++ b/doc/src/sgml/xfunc.sgml @@ -3643,7 +3643,11 @@ extern void InjectionPointAttach(const char *name, static void custom_injection_callback(const char *name, const void *private_data) { + uint32 wait_event_info = WaitEventInjectionPointNew(name); + + pgstat_report_wait_start(wait_event_info); elog(NOTICE, "%s: executed custom callback", name); + pgstat_report_wait_end(); } </programlisting> This callback prints a message to server error log with severity |