aboutsummaryrefslogtreecommitdiff
path: root/doc/src/sgml/func.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/sgml/func.sgml')
-rw-r--r--doc/src/sgml/func.sgml29
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index b001ce548d8..c0b94bc0728 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -14997,6 +14997,12 @@ SELECT * FROM pg_ls_dir('.') WITH ORDINALITY AS t(ls,n);
</row>
<row>
+ <entry><literal><function>pg_blocking_pids(<type>int</type>)</function></literal></entry>
+ <entry><type>int[]</type></entry>
+ <entry>Process ID(s) that are blocking specified server process ID</entry>
+ </row>
+
+ <row>
<entry><literal><function>pg_conf_load_time()</function></literal></entry>
<entry><type>timestamp with time zone</type></entry>
<entry>configuration load time</entry>
@@ -15184,6 +15190,29 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
</para>
<indexterm>
+ <primary>pg_blocking_pids</primary>
+ </indexterm>
+
+ <para>
+ <function>pg_blocking_pids</function> returns an array of the process IDs
+ of the sessions that are blocking the server process with the specified
+ process ID, or an empty array if there is no such server process or it is
+ not blocked. One server process blocks another if it either holds a lock
+ that conflicts with the blocked process's lock request (hard block), or is
+ waiting for a lock that would conflict with the blocked process's lock
+ request and is ahead of it in the wait queue (soft block). When using
+ parallel queries the result always lists client-visible process IDs (that
+ is, <function>pg_backend_pid</> results) even if the actual lock is held
+ or awaited by a child worker process. As a result of that, there may be
+ duplicated PIDs in the result. Also note that when a prepared transaction
+ holds a conflicting lock, it will be represented by a zero process ID in
+ the result of this function.
+ Frequent calls to this function could have some impact on database
+ performance, because it needs exclusive access to the lock manager's
+ shared state for a short time.
+ </para>
+
+ <indexterm>
<primary>pg_conf_load_time</primary>
</indexterm>