Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s9V2Y-002l51-Mk for pgsql-general@arkaria.postgresql.org; Tue, 21 May 2024 19:20:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s9V2Y-00CBI6-0w for pgsql-general@arkaria.postgresql.org; Tue, 21 May 2024 19:20:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s9V2X-00CBHx-I4 for pgsql-general@lists.postgresql.org; Tue, 21 May 2024 19:20:49 +0000 Received: from mout.gmx.net ([212.227.15.19]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s9V2Q-001KxB-36 for pgsql-general@lists.postgresql.org; Tue, 21 May 2024 19:20:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1716319238; x=1716924038; i=jimis@gmx.net; bh=U3+85D6VUwG/Xj+QvmnQA2TAcpq3Anl/vZVjdLzTCNg=; h=X-UI-Sender-Class:Date:From:To:cc:Subject:In-Reply-To:Message-ID: References:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=c/zpOT2Z6pd6dTaRc4l+nxNjp2MSQJTrbwPRHSn3m1eusA3Unu2SKXxpmP8MZtT6 eLP0qCktu+1W1EDVRrjTaNCsEAxKvHRHVSrVPBRxYQQlZKzOZ1arLtckg0UAlHNnr OZfIx8P9FGZ/WuUJYl2M/diXZmU/dfsOCDTFutxSoozKzEfmGxNj2u4dNXb2hwhgW ER1j0tL5qpM5QBzDvkioC87DB0j1c5w9jYwCFPI+oHHi7/MyNILBDkoFem7Wajq2N TKNWyeQsPqDJyjDtFQM5V+qbEpnt8Ff35oPy0fSi/CA1WJU/C1GUkWubOdtqZb8r9 /DDyQ6kST/WxGqPWrA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [10.9.70.64] ([185.55.106.54]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MSbxD-1rygMW3Zaz-00SzpL; Tue, 21 May 2024 21:20:38 +0200 Date: Tue, 21 May 2024 21:20:36 +0200 (CEST) From: Dimitrios Apostolou To: Kashif Zeeshan cc: Muhammad Imtiaz , pgsql-general@lists.postgresql.org Subject: Re: pg_stat_io clarifications: background worker, writes and reads In-Reply-To: Message-ID: <89bc1c8f-aac1-926c-38bb-1bbf55bec4b0@gmx.net> References: <2e9b2b7b-79a1-a7f2-e05e-9cefda601c09@gmx.net> <12733373-8f3c-550e-771d-fa7b5ff9343d@gmx.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-1747678927-1716319237=:5296" X-Provags-ID: V03:K1:dHiHrH8BZYDkwsjdGFjzV3i0w66nHcXkq1AatQENr+JQCRnezAX TT8WLifMTCwRsMSdN1/oE+CS9F5hbyWGhOYDXKtOwhpW1c81OD9smSHJlWaUB1+sF1EouJ1 lQR6EX6Xltb9MfARwK9pc3unPjgCKsPGIxk21/Gx/YWVt9dlzNRBuOiMWnXgMkbwsjR/7RU O/RYo/f96wQ4jwDTf35yg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:uvKM6CrAEo0=;Y4jCGY6WUcjwjZ0ab9MbxRsKPAW PEwgox93srbTHgr5WJabzbHO0twCfpZeSusaD1G3vngQTbUcWVSzLZ2mJUkI60uZeBuNRoNZO N40QLr85Svwx1yUgLA5wMWWRDk7WjcC8ZU0LJ4j67NsuczlPgMA533xl8fz2ERajvMIXLHgKV wlfx9FxlZkj8THz8Gj0W1A2RFWy4Jq47BB+qMUbBjynZSEHwRTXcyv4iEc1owUbFOBSqqDb3X ZuTMOHYrbRimK50e3M/0fQ92RskyqJAEISzfmEIgyhjX/qQbOG9bmbKAfa6RKd9G32veLSuIB 0l1p0wG0QU9x3kwdudNv/Stb0IKJ/FjKMTaNWE2a6RNlXv4O/iM2hGrKcFsuxWvGHl3PKDILt KcxI6wIPHZXgu845vN1P7WrB1JPIYyWThHO3pEH1lFbvMpF1rIS0CsdwJ7JVvall+mAUsb+Va KuBwUb12Gg7jKySKAKuFB8tLIetNEHBsCuJesVJkagW7P7TlkvHB0PUiNArVHn3/rCxuRbCvH Gok0u+CVO7GBEU15rGZ3624SQ44GTBXHtE3XHtFsI+CFULCxuuU1JoCE05oNZvzqo1tJzd8bk HEiIG5EmXs9duQQXJGw1Mlv91e08JngFHwV2dOwu51LQEcqhv8T2ipoXE1uyu5Ft9byQMI4eA OWmBGpVKQjkWPxsyhuVbMVa7N9Lg06pwVP0J1pwAIU2/M0zckkSeZcoleF9rj+ctaNQywEsZJ 8l+ISFkiuMRKLVHIyI7a4fHxp1KNOQMrICW2esd2eQamikFh4F5ALNC8bROpA4nyxP9n1GNUH ZI0KkxTyyDKQxcx3IGcuXV+2YyyT3oVr8x6s6YynjjS/A= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1747678927-1716319237=:5296 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Kashif, just to clarify my question, are you saying that the I/O from parallel workers is recorded into the "background worker" entry of pg_stat_io? Thanks, Dimitris On Wed, 15 May 2024, Kashif Zeeshan wrote: > Hi > parallel worker are used for parallel execution of the queries and you c= an find the help in the below link. > > https://www.postgresql.org/docs/current/how-parallel-query-works.html > > Its controlled by following parameters. > > max_worker_processes =3D 6 > max_parallel_workers_per_gather =3D 3 > max_parallel_workers =3D 6 > The limit of concurrent parallel workers for the whole cluster is max_pa= rallel_workers, which must be =E2=89=A4 max_worker_processes. The limit of= parallel workers per query is max_parallel_workers_per_gather. > > Thanks > Kashif Zeeshan > Bitnine Global > > On Wed, May 15, 2024 at 5:59=E2=80=AFPM Dimitrios Apostolou wrote: > So what is this particular "background worker" I'm seeing, given t= hat I > have no replication or extensions? > > Searching the logs I found entries like the following: > > LOG:=C2=A0 background worker "parallel worker" (PID 93384) exited = with exit code 1 > > This got logged when I killed a simple SELECT query that took too = long > doing parallel seqscans. Could it be that the entry in pg_stat_io = named > "background worker" also includes the parallel workers from a SELE= CT > query? > > Thanks, > Dimitris --0-1747678927-1716319237=:5296--