]> begriffs open source - ai-pg/blob - full-docs/src/sgml/html/view-pg-aios.html
PG 18 docs from https://ftp.postgresql.org/pub/source/v18.0/postgresql-18.0-docs...
[ai-pg] / full-docs / src / sgml / html / view-pg-aios.html
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>53.2. pg_aios</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="views-overview.html" title="53.1. Overview" /><link rel="next" href="view-pg-available-extensions.html" title="53.3. pg_available_extensions" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">53.2. <code class="structname">pg_aios</code></th></tr><tr><td width="10%" align="left"><a accesskey="p" href="views-overview.html" title="53.1. Overview">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="views.html" title="Chapter 53. System Views">Up</a></td><th width="60%" align="center">Chapter 53. System Views</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="view-pg-available-extensions.html" title="53.3. pg_available_extensions">Next</a></td></tr></table><hr /></div><div class="sect1" id="VIEW-PG-AIOS"><div class="titlepage"><div><div><h2 class="title" style="clear: both">53.2. <code class="structname">pg_aios</code> <a href="#VIEW-PG-AIOS" class="id_link">#</a></h2></div></div></div><a id="id-1.10.5.6.2" class="indexterm"></a><p>
3    The <code class="structname">pg_aios</code> view lists all <a class="xref" href="glossary.html#GLOSSARY-AIO" title="Asynchronous I/O">Asynchronous <acronym class="acronym">I/O</acronym></a> handles that are currently in-use.  An I/O handle
4    is used to reference an I/O operation that is being prepared, executed or
5    is in the process of completing.  <code class="structname">pg_aios</code> contains
6    one row for each I/O handle.
7   </p><p>
8    This view is mainly useful for developers of
9    <span class="productname">PostgreSQL</span>, but may also be useful when tuning
10    <span class="productname">PostgreSQL</span>.
11   </p><div class="table" id="id-1.10.5.6.5"><p class="title"><strong>Table 53.2. <code class="structname">pg_aios</code> Columns</strong></p><div class="table-contents"><table class="table" summary="pg_aios Columns" border="1"><colgroup><col /></colgroup><thead><tr><th class="catalog_table_entry"><p class="column_definition">
12        Column Type
13       </p>
14       <p>
15        Description
16       </p></th></tr></thead><tbody><tr><td class="catalog_table_entry"><p class="column_definition">
17        <code class="structfield">pid</code> <code class="type">int4</code>
18       </p>
19       <p>
20        Process ID of the server process that is issuing this I/O.
21       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
22        <code class="structfield">io_id</code> <code class="type">int4</code>
23       </p>
24       <p>
25        Identifier of the I/O handle. Handles are reused once the I/O
26        completed (or if the handle is released before I/O is started). On reuse
27        <a class="link" href="view-pg-aios.html#VIEW-PG-AIOS-IO-GENERATION">
28         <code class="structname">pg_aios</code>.<code class="structfield">io_generation</code>
29        </a>
30        is incremented.
31       </p></td></tr><tr><td id="VIEW-PG-AIOS-IO-GENERATION" class="catalog_table_entry"><p class="column_definition">
32        <code class="structfield">io_generation</code> <code class="type">int8</code>
33       </p>
34       <p>
35        Generation of the I/O handle.
36       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
37        <code class="structfield">state</code> <code class="type">text</code>
38       </p>
39       <p>
40        State of the I/O handle:
41        </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
42           <code class="literal">HANDED_OUT</code>, referenced by code but not yet used
43          </p></li><li class="listitem"><p>
44           <code class="literal">DEFINED</code>, information necessary for execution is known
45          </p></li><li class="listitem"><p>
46           <code class="literal">STAGED</code>, ready for execution
47          </p></li><li class="listitem"><p>
48           <code class="literal">SUBMITTED</code>, submitted for execution
49          </p></li><li class="listitem"><p>
50           <code class="literal">COMPLETED_IO</code>, finished, but result has not yet been processed
51          </p></li><li class="listitem"><p>
52           <code class="literal">COMPLETED_SHARED</code>, shared completion processing completed
53          </p></li><li class="listitem"><p>
54           <code class="literal">COMPLETED_LOCAL</code>, backend local completion processing completed
55          </p></li></ul></div><p>
56       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
57        <code class="structfield">operation</code> <code class="type">text</code>
58       </p>
59       <p>
60        Operation performed using the I/O handle:
61        </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
62           <code class="literal">invalid</code>, not yet known
63          </p></li><li class="listitem"><p>
64           <code class="literal">readv</code>, a vectored read
65          </p></li><li class="listitem"><p>
66           <code class="literal">writev</code>, a vectored write
67          </p></li></ul></div><p>
68       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
69        <code class="structfield">off</code> <code class="type">int8</code>
70       </p>
71       <p>
72        Offset of the I/O operation.
73       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
74        <code class="structfield">length</code> <code class="type">int8</code>
75       </p>
76       <p>
77        Length of the I/O operation.
78       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
79        <code class="structfield">target</code> <code class="type">text</code>
80       </p>
81       <p>
82        What kind of object is the I/O targeting:
83        </p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc; "><li class="listitem"><p>
84           <code class="literal">smgr</code>, I/O on relations
85          </p></li></ul></div><p>
86       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
87        <code class="structfield">handle_data_len</code> <code class="type">int2</code>
88       </p>
89       <p>
90        Length of the data associated with the I/O operation. For I/O to/from
91        <a class="xref" href="runtime-config-resource.html#GUC-SHARED-BUFFERS">shared_buffers</a> and <a class="xref" href="runtime-config-resource.html#GUC-TEMP-BUFFERS">temp_buffers</a>, this indicates the number of buffers the
92        I/O is operating on.
93       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
94        <code class="structfield">raw_result</code> <code class="type">int4</code>
95       </p>
96       <p>
97        Low-level result of the I/O operation, or NULL if the operation has not
98        yet completed.
99       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
100        <code class="structfield">result</code> <code class="type">text</code>
101       </p>
102       <p>
103        High-level result of the I/O operation:
104        </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
105           <code class="literal">UNKNOWN</code> means that the result of the
106           operation is not yet known.
107          </p></li><li class="listitem"><p>
108           <code class="literal">OK</code> means the I/O completed successfully.
109          </p></li><li class="listitem"><p>
110           <code class="literal">PARTIAL</code> means that the I/O completed without
111           error, but did not process all data. Commonly callers will need to
112           retry and perform the remainder of the work in a separate I/O.
113          </p></li><li class="listitem"><p>
114           <code class="literal">WARNING</code> means that the I/O completed without
115           error, but that execution of the IO triggered a warning. E.g. when
116           encountering a corrupted buffer with <a class="xref" href="runtime-config-developer.html#GUC-ZERO-DAMAGED-PAGES">zero_damaged_pages</a> enabled.
117          </p></li><li class="listitem"><p>
118           <code class="literal">ERROR</code> means the I/O failed with an error.
119          </p></li></ul></div><p>
120       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
121        <code class="structfield">target_desc</code> <code class="type">text</code>
122       </p>
123       <p>
124        Description of what the I/O operation is targeting.
125       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
126        <code class="structfield">f_sync</code> <code class="type">bool</code>
127       </p>
128       <p>
129        Flag indicating whether the I/O is executed synchronously.
130       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
131        <code class="structfield">f_localmem</code> <code class="type">bool</code>
132       </p>
133       <p>
134        Flag indicating whether the I/O references process local memory.
135       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
136        <code class="structfield">f_buffered</code> <code class="type">bool</code>
137       </p>
138       <p>
139        Flag indicating whether the I/O is buffered I/O.
140       </p></td></tr></tbody></table></div></div><br class="table-break" /><p>
141    The <code class="structname">pg_aios</code> view is read-only.
142   </p><p>
143    By default, the <code class="structname">pg_aios</code> view can be read only by
144    superusers or roles with privileges of the
145    <code class="literal">pg_read_all_stats</code> role.
146   </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="views-overview.html" title="53.1. Overview">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="views.html" title="Chapter 53. System Views">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="view-pg-available-extensions.html" title="53.3. pg_available_extensions">Next</a></td></tr><tr><td width="40%" align="left" valign="top">53.1. Overview </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 53.3. <code class="structname">pg_available_extensions</code></td></tr></table></div></body></html>