pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Fujii Masao <masao.fujii@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: Add "io worker" as backend_type to the pg_stat_activity documentation
Date: Wed, 22 Jul 2026 12:22:23 +0200
Message-ID: <659d0c76d86b5f0e4c37071ac7a7e2fd3efd9fdb.camel@cybertec.at> (raw)
In-Reply-To: <CAHGQGwExp4bJa36TRmvTXBL5QwKWcKPtLSDtxnhJgt7-dCOO1A@mail.gmail.com>
References: <5e94c0196084f648ae6a00107125494f5804318a.camel@cybertec.at>
	<al8noIYGjD_Lyyi8@paquier.xyz>
	<eb735d8aedf16ab2121af6f9b65b3274927afd2d.camel@cybertec.at>
	<CAHGQGwEDY0GkP4Tapn+qtaxB6aNtjPzqozRL8_Hf1Sg3B+H+8w@mail.gmail.com>
	<4aff5b0f5a1bf3b487d06daec5ed5a287afa7a22.camel@cybertec.at>
	<al_wOWrsHfB65Zbk@paquier.xyz>
	<CAHGQGwExp4bJa36TRmvTXBL5QwKWcKPtLSDtxnhJgt7-dCOO1A@mail.gmail.com>

On Wed, 2026-07-22 at 18:34 +0900, Fujii Masao wrote:
> a couple of minor comments:
> 
> +          <literal>archiver</literal>: The WAL archiver, active when
> +          <xref linkend="guc-archive-mode"/> is <literal>on</literal>.
> 
> The archiver is also active when archive_mode = always. So isn't it better
> to say "active when archive_mode is enabled" (as in the Glossary), or
> "when archive_mode is on or always"?

True.  I went with "enabled".

> +          <literal>logical replication launcher</literal>: The background
> +          process that launches logical replication worker processes for
> +          subscriptions.
> +         </para>
> +        </listitem>
> +        <listitem>
> +         <para>
> +          <literal>logical replication apply worker</literal>: A background
> +          process that applies data modifications on a logical subscriber.
> 
> If these entries are meant to be in alphabetical order, shouldn't
> "logical replication apply worker" come before "logical replication launcher"?

I must have picked the wrong collation :^/

v4 is attached.

Yours,
Laurenz Albe

Attachments:

  [text/x-patch] v4-0001-Properly-document-pg_stat_activity.backend_type.patch (7.8K, ../659d0c76d86b5f0e4c37071ac7a7e2fd3efd9fdb.camel@cybertec.at/2-v4-0001-Properly-document-pg_stat_activity.backend_type.patch)
  download | inline diff:
From af0e0a1b50a3c1270077f64b88949a14fc1fd10d Mon Sep 17 00:00:00 2001
From: Laurenz Albe <laurenz.albe@cybertec.at>
Date: Wed, 22 Jul 2026 12:20:00 +0200
Subject: [PATCH v4] Properly document pg_stat_activity.backend_type

The documentation of pg_stat_activity should list all possible values
for the backend type, but the list was inaccurate and incomplete.

Since the complete list is pretty long, turn it into an alphabetically
sorted itemized list and add a description for each type.

Author: Laurenz Albe <laurenz.albe@cybertec.at>
Reviewed-By: Michael Paquier <michael@paquier.xyz>
Reviewed-By: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/5e94c0196084f648ae6a00107125494f5804318a.camel@cybertec.at
---
 doc/src/sgml/monitoring.sgml | 165 ++++++++++++++++++++++++++++++++---
 1 file changed, 155 insertions(+), 10 deletions(-)

diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index d1a20d001e9..b087d499041 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -1057,16 +1057,161 @@ postgres   27093  0.0  0.0  30096  2752 ?        Ss   11:34   0:00 postgres: ser
        <structfield>backend_type</structfield> <type>text</type>
       </para>
       <para>
-       Type of current backend. Possible types are
-       <literal>autovacuum launcher</literal>, <literal>autovacuum worker</literal>,
-       <literal>logical replication launcher</literal>,
-       <literal>logical replication worker</literal>,
-       <literal>parallel worker</literal>, <literal>background writer</literal>,
-       <literal>client backend</literal>, <literal>checkpointer</literal>,
-       <literal>archiver</literal>, <literal>standalone backend</literal>,
-       <literal>startup</literal>, <literal>walreceiver</literal>,
-       <literal>walsender</literal>, <literal>walwriter</literal> and
-       <literal>walsummarizer</literal>.
+       Type of current backend. Possible types are:
+       <itemizedlist>
+        <listitem>
+         <para>
+          <literal>archiver</literal>: The WAL archiver, active when
+          <xref linkend="guc-archive-mode"/> is enabled.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>autovacuum launcher</literal>: The background process that
+          launches autovacuum workers, active when
+          <xref linkend="guc-autovacuum"/> is <literal>on</literal>.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>autovacuum worker</literal>: A background process running
+          <command>VACUUM</command> or <command>ANALYZE</command> on a single
+          table.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>background writer</literal>: The background process that
+          makes sure that there are enough clean buffers in shared buffers.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>checkpointer</literal>: The background process that
+          performs <link linkend="wal-configuration">checkpoints</link>
+          regularly.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>client backend</literal>: The server process performing
+          work for a regular database connection.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>datachecksums launcher</literal>: The background process
+          that launches data checksum workers.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>datachecksums worker</literal>: A background process that
+          calculates data checksums for all pages in one database.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>io worker</literal>: A background process performing
+          asynchronous I/O, active when <xref linkend="guc-io-method"/> is set
+          to <literal>worker</literal>.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>logical replication apply worker</literal>: A background
+          process that applies data modifications on a logical subscriber.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>logical replication launcher</literal>: The background
+          process that launches logical replication worker processes for
+          subscriptions.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>logical replication parallel worker</literal>: A background
+          process that applies data modifications on a logical subscriber
+          for a subscription with <literal>streaming = parallel</literal>.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>logical replication sequencesync worker</literal>: A
+          background process that replicates sequence data on a logical
+          subscriber.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>logical replication tablesync worker</literal>: A
+          background process that copies table data on a logical subscriber
+          for a subscription with <literal>copy_data = true</literal>.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>parallel worker</literal>: A background process that helps
+          a backend process to perform operations in parallel.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>REPACK decoding worker</literal>: A background process that
+          decodes WAL for <command>REPACK (CONCURRENTLY)</command>.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>slotsync worker</literal>: The background process that
+          synchronizes logical replication slots on a streaming replication
+          standby server, active when <xref linkend="guc-sync-replication-slots"/>
+          is set to <literal>on</literal>.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>standalone backend</literal>: The backend process when
+          <productname>PostgreSQL</productname> was started in
+          <xref linkend="app-postgres-single-user"/>.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>startup</literal>: The background process that replays WAL
+          during crash recovery, archive recovery or streaming replication.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>walreceiver</literal>: The background process that receives
+          WAL records from a WAL sender, active in streaming replication
+          standby mode.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>walsender</literal>: A background process that sends WAL
+          records to receivers (during streaming replication) or decodes WAL
+          and sends the decoded information (during logical replication).
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>walsummarizer</literal>: The background process that
+          creates summaries from WAL for use with incremental backup, active
+          when <xref linkend="guc-summarize-wal"/> is <literal>on</literal>.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>walwriter</literal>: The background process that persists
+          WAL records from WAL buffers to disk.
+         </para>
+        </listitem>
+       </itemizedlist>
        In addition, background workers registered by extensions may have
        additional types.
       </para></entry>
-- 
2.55.0



view thread (12+ messages)  latest in thread

Message-ID: <659d0c76d86b5f0e4c37071ac7a7e2fd3efd9fdb.camel@cybertec.at>
Permalink:  ../659d0c76d86b5f0e4c37071ac7a7e2fd3efd9fdb.camel@cybertec.at/
Also on:    postgresql.org/message-id/659d0c76d86b5f0e4c37071ac7a7e2fd3efd9fdb.camel@cybertec.at

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: laurenz.albe@cybertec.at, masao.fujii@gmail.com, michael@paquier.xyz, pgsql-docs@lists.postgresql.org
  Subject: Re: Add "io worker" as backend_type to the pg_stat_activity documentation
  In-Reply-To: <659d0c76d86b5f0e4c37071ac7a7e2fd3efd9fdb.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox