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 1vjQJK-00EovA-1i for pgsql-general@arkaria.postgresql.org; Fri, 23 Jan 2026 23:11:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vjQJJ-001iOR-1Z for pgsql-general@arkaria.postgresql.org; Fri, 23 Jan 2026 23:11:25 +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.96) (envelope-from ) id 1vjQJI-001iOJ-1T for pgsql-general@lists.postgresql.org; Fri, 23 Jan 2026 23:11:25 +0000 Received: from fhigh-a1-smtp.messagingengine.com ([103.168.172.152]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vjQJF-001yjf-2d for pgsql-general@postgresql.org; Fri, 23 Jan 2026 23:11:23 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 3F8D9140005A; Fri, 23 Jan 2026 18:11:21 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Fri, 23 Jan 2026 18:11:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1769209881; x=1769296281; bh=1T4Ss/sZHg8XNYiGPuCp2PRoN2Tb5wcwcn3Toxu8cZU=; b= FgIGhqzUgpr5XxmNRPSJMv8UmKLiTKsi1eFxEnwRkiF4DjpXr8sre+cccaxgIWCI cVnqKO7XiJ16y/dxZgg8ENxNzMsbRIwn+ZN72EiN4alJ6B2bYhlOGoBD4+Uy177t po7UsdUGHQpE6aYRyl1BEBvWofjyCf4WrHg2mzlogrzmgnjd0z9j5XAMZskyNE12 20Yg+AqULbS6u9slE3Qh6hJnIHg7yGjPPGu6K+NlGTR9mz/EpCSuQc0hNImpJ2a7 EtI0T8O9uw6o5g8dBdvRV3Bs5lcm1UT7+L6rTUaPmdV1/eoetUG0ObaDdOs6vouN +DQY6HbTDUs6Gz7JHdskVg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1769209881; x= 1769296281; bh=1T4Ss/sZHg8XNYiGPuCp2PRoN2Tb5wcwcn3Toxu8cZU=; b=j R7fH+ZX130DSz+1CNiXf9WuYgUCqz5uGddnrDavtrpv6FDkLKk1Arr93qyocSTMu A+dSeRvIkoieHyPTp/tFQT3yE9UffHqqTui4V1zNxcfAb9ARxowZBcdPDqYa3b68 WpBIxSW5y6RB4FBFOXJTm5v80xf5IEhGkrYWcG1I+6S4pCwxKDewF8LVZ8sygm+O RjqCVQ0ZpDaCZU5FQXRTVj7VFXgNgQeeGobEuJhtuBCuQ/4ZaWrPa6P8udzJpoVU GPpS5RIcr54UEsETShtaDx4CGN4CPXddwH3FVYOJOkavPVP0fSxTaNQVFhoRostB CzVebc8VG6q/ddR1K6CvA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduhedtfedvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekre dttddvjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpefgudefkefhve efleevieeuveehvdduudekuddvvdelhfeuueeijedtuedvvedvueenucffohhmrghinhep phhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtgho mhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepkh hktghhnhdrihhnsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqghgvnhgv rhgrlhesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 23 Jan 2026 18:11:20 -0500 (EST) Message-ID: <86a7a676-a6c0-4b66-a729-adfb80030331@aklaver.com> Date: Fri, 23 Jan 2026 15:11:19 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Resource Usage same In spite of fronting my DB server with Pgbouncer ? To: KK CHN Cc: pgsql-general References: <00fe13de-cbfb-4652-8d62-7b7b15dddd39@aklaver.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/23/26 11:47 AM, KK CHN wrote: > You mean to say the SQL statements are making this issue ?  I also > suspected wrongly formed query statements making this much load on the > DB server. >  I also suspect this,  as the developers who write queries are not so > expertised for writing optimized queries, needs to be addressed separately. > > How can I find out which query statements are making the DB server on > its knees ?  Any method to find the bad queries? what parameters/ > behaviours to be checked for finding those query statements which really > makes the db server to its knees  by the heavy lifting ?   any hints > most welcome, I can explore and fix those ones. For log settings that deal with statements, take a look at: https://www.postgresql.org/docs/16/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHEN and https://www.postgresql.org/docs/16/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHAT There is also, for viewing statistics on current activity: https://www.postgresql.org/docs/16/monitoring-stats.html#MONITORING-STATS-VIEWS For another view of statistics see the extension: https://www.postgresql.org/docs/16/pgstatstatements.html In particular: https://www.postgresql.org/docs/16/monitoring-stats.html#MONITORING-PG-STAT-ACTIVITY-VIEW Also for lock activity: https://www.postgresql.org/docs/16/view-pg-locks.html > Sorry I missed to mention it, this is an EDB 16 server.   Eventhoug I > prefer to use any piece of S/W that is FOSS community editions, > sometimes it is demanded to manage these products  too. > EDB has variations of what they offer, a more specific definition would be helpful.