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.96) (envelope-from ) id 1vy3uY-00HO9X-1B for pgsql-general@arkaria.postgresql.org; Thu, 05 Mar 2026 08:18:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vy3uW-00GYlr-2b for pgsql-general@arkaria.postgresql.org; Thu, 05 Mar 2026 08:18:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vy3uW-00GYli-1S for pgsql-general@lists.postgresql.org; Thu, 05 Mar 2026 08:18:20 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vy3uU-00000000paX-2uCi for pgsql-general@postgresql.org; Thu, 05 Mar 2026 08:18:20 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4834826e5a0so87789455e9.2 for ; Thu, 05 Mar 2026 00:18:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1772698698; x=1773303498; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=Ger8trrW+rxYZWes+/JEeJXsSbCpUZmpuub9GL24foM=; b=ZQy9WcljO52jNGZlBZ/f2znNX6sK7Fm77nR59i8ntby7VXrYtBMXh6BMzkp5XkldS/ wtizatVG86VqGwvVSmOZPYV42V8tri9OiK/XR8MKXHL0Q7RBK+0/rEpAJpez4I50lTzX wDikc/+LFBfVK/XmjK1P+8DMjO1Kjv3MMPWsE1aZwieMj0VASa0qpPmK3iHFg5eI3EDo p/jCRCSBxSGEjYm6e1uW2A0dJIh+ZSk6V1KBUdDrkEZ2s2/03K6GPLLa0pNokfyRP3hl PxYPuAzA3/6wAwnJ5JPaAVFZwUzt6FxFhajSeoDxs5vzax31+4KEp6JXsWyetqY6gtgM tsSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772698698; x=1773303498; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ger8trrW+rxYZWes+/JEeJXsSbCpUZmpuub9GL24foM=; b=v/zmAK/3i2EDOJ6tV0plE/3Q2oxSmKTVTgnjrjuL7KFIs0aWKgzS01CIbhuyRLGNz2 twTepFx0n98uviZIsxb0iNo7eguXtAqypKbIYu5vUcz+JC1GQ8ZjbEqiNOnp/q7/+OZ3 /xHATmQQcAWU5UXCicpWWgfPGYIVGZrvujS8Unes2yORu6iCkX7LJTD5YaVI70FWXOuE lEuqWuQtHEB66x7pAEHR1lbCxCHJ423EdEaiP7lOPGOiFSv1nHGA7GJq9jF6pa+1VQFM eEOZh3+JBO+N0nWX+e8g7WQDAlLanmQBf+2FoFtRIMcB0Q0U/O1fSnJYwtAfKFZuvYhP r4jQ== X-Forwarded-Encrypted: i=1; AJvYcCUZETILpLoDEdHLAfEOCWfewLdWmQ5MmCO1u8XgWyLS+PvG3rehJQJhXdoc9L8325uxPFstC+R0FWHA2X1T@postgresql.org X-Gm-Message-State: AOJu0YwO1VcvuIaZq8lTGt1rExJ4/UoVtSldL1vE7QfGWzpCuOmFdqpI O5HmHtAkIqGgCvzEBHtYshBrmm733N8Ainkd/sJCEqptwxBu+8OZDoZ/3JSHX7HdKZb7+lJrVYr LZOQpezI= X-Gm-Gg: ATEYQzyFaz7jBVxIdAV1acrnmo4Sc9ckm7zdalxEkRgv7KqyexEO2g5da7WDr36NLZ4 caynvF5DziYo1/XY2X8J3EHz/EvSUKHZtWSR0VuEBCvu9QsTPGJ6rpUYjwilyFxiq0bZInanVrK JRHxGqOihx0vOaUJiAx36f+v+7qJL/yMk4ki0J87cnuhalhYkZtA0oTtetwlYBgRzdUCoX5nwWx UzmOMqTuQtlYjYsCLwMirghFyYZaCJ6J8h7+khsycMeWxVjJdpIYD3rwq5sEJfwKSDH4//lYbFT aqvKYGzjqwvK2BEQ4sFK2lNqKvCFh+tkNx7fBJiocTF/M4bZ6vFrOi6kUjJgKh5vsTjTO+vXgql Yl4W19+b/tbs1DnMkwJz9Bugpjhmder4mvRV1CwDlFE0oVR+ALivoJSR7Z+tCLvNFndnx3400dk gMP1jsUviJPiC9NGqXxW6zuj2RAIF/p/kRFp/q4p52tbzXO8t6F3oD X-Received: by 2002:a05:600c:4ed0:b0:483:6bb1:117 with SMTP id 5b1f17b1804b1-485198a5a49mr64096705e9.32.1772698697529; Thu, 05 Mar 2026 00:18:17 -0800 (PST) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:70:9c05:11b9:738f:ef31:9271]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4851fad01d2sm26048695e9.3.2026.03.05.00.18.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2026 00:18:17 -0800 (PST) Message-ID: Subject: Re: Heavy load on DB Cluster From: Laurenz Albe To: KK CHN , pgsql-general Date: Thu, 05 Mar 2026 09:18:15 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.3 (3.58.3-1.fc43) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 2026-03-05 at 12:30 +0530, KK CHN wrote: > I am experiencing heavy load on my database cluster and DB server perform= ance degrading over the time. > vCPUs 16 ,=C2=A0 Mem 32 G=C2=A0 =C2=A0Swap : 8G=C2=A0 =C2=A0storage 5T=C2= =A0 =C2=A0 =C2=A0 =C2=A0RHEL 9.4=C2=A0 postgres 16 >=20 >=20 > top - 11:55:18 up 175 days, =C2=A07:52, =C2=A03 users, =C2=A0load average= : 11.07, 10.05, 9.56 > Tasks: 731 total, =C2=A014 running, 717 sleeping, =C2=A0 0 stopped, =C2= =A0 0 zombie > %Cpu(s): 28.8 us, =C2=A09.3 sy, =C2=A00.0 ni, 44.9 id, 13.7 wa, =C2=A00.8= hi, =C2=A02.5 si, =C2=A00.0 st > MiB Mem : =C2=A031837.6 total, =C2=A0 =C2=A0531.8 free, =C2=A014773.3 use= d, =C2=A025392.0 buff/cache > MiB Swap: =C2=A0 8060.0 total, =C2=A0 5140.4 free, =C2=A0 2919.6 used. = =C2=A017064.2 avail Mem >=20 > =C2=A0 =C2=A0 PID USER =C2=A0 =C2=A0 =C2=A0PR =C2=A0NI =C2=A0 =C2=A0VIRT = =C2=A0 =C2=A0RES =C2=A0 =C2=A0SHR S =C2=A0%CPU =C2=A0%MEM =C2=A0 =C2=A0 TIM= E+ COMMAND > 3148533 postgre+ =C2=A020 =C2=A0 0 8973544 =C2=A0 7.3g =C2=A0 7.3g S =C2= =A032.9 =C2=A023.5 =C2=A0 0:22.52 postgres > 3150012 postgre+ =C2=A020 =C2=A0 0 8991380 =C2=A0 7.4g =C2=A0 7.4g S =C2= =A032.9 =C2=A023.9 =C2=A0 0:26.16 postgres > 3081907 postgre+ =C2=A020 =C2=A0 0 9078400 =C2=A0 8.0g =C2=A0 7.9g R =C2= =A021.9 =C2=A025.8 =C2=A0 2:44.53 postgres > 3125409 postgre+ =C2=A020 =C2=A0 0 9075568 =C2=A0 8.1g =C2=A0 8.0g S =C2= =A021.3 =C2=A026.0 =C2=A0 2:34.63 postgres > 3126500 postgre+ =C2=A020 =C2=A0 0 9073928 =C2=A0 8.0g =C2=A0 7.9g S =C2= =A018.3 =C2=A025.7 =C2=A0 2:33.10 postgres > 3081925 postgre+ =C2=A020 =C2=A0 0 9059088 =C2=A0 8.2g =C2=A0 8.2g S =C2= =A017.6 =C2=A026.5 =C2=A0 6:38.79 postgres=C2=A0 >=20 > I have pgbackrest(2.52.1) running for incremental backups to a remote rep= oserver > and local=C2=A0 =C2=A0WAL replication configured to an onprem standalone= =C2=A0 instance on > another VM in the same local LAN.=C2=A0 >=20 > archive_mode =3D on =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # en= ables archiving; off, on, or always > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # (change requires restart) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # (empty string indicates archive_co= mmand should > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # be used) > archive_command =3D 'pgbackrest --stanza=3DMy_Repo archive-push %p' >=20 > To identify the resource consuming queries I ran=C2=A0 and found=C2=A0 on= ly one > [40 days 17:22:59.029204 | START_REPLICATION 8E ]=C2=A0 and rest all seem= s normal .=C2=A0 =C2=A0 >=20 > How come this START_REPLICATION running for 40 days and 17:30 Hrs Is this= normal ?? > Is this due to pgbackrest=C2=A0 =C2=A0 or=C2=A0 =C2=A0WAL replication to = local VM ? That is an active replication - or pg_receivewal, which amounts to the same= . That's not really a query; the standby is streaming WAL from the primary an= d has been doing that for over 40 days. Nothing to worry about. > What may be the issue and how to resolve it ? For that, configure pg_stat_statements and use it to find your most time-co= nsuming statements. Yours, Laurenz Albe