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 1wBRVH-0014Gv-01 for pgsql-admin@arkaria.postgresql.org; Sat, 11 Apr 2026 06:07:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wBRVD-00FniW-0P for pgsql-admin@arkaria.postgresql.org; Sat, 11 Apr 2026 06:07:32 +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 1wBRVC-00FniN-2D for pgsql-admin@lists.postgresql.org; Sat, 11 Apr 2026 06:07:31 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wBRVA-00000000TUh-3rGP for pgsql-admin@lists.postgresql.org; Sat, 11 Apr 2026 06:07:31 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-48897fd88ebso28768565e9.2 for ; Fri, 10 Apr 2026 23:07:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775887643; x=1776492443; darn=lists.postgresql.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=g0W2dkhDE0DBYruk+1K3z7EcCO1MRKuGr7YTeE1lILQ=; b=Jv8O5M0zkrz+w5QvtokZNwvjPsaB1+Wji94R6jgGLeb1f9br1AVEymAPyvyFTVRFKB gKZIwFWrxj4l/2bx7XSTAcEnOTeeIZchht6jqfaSMud1E6+Gij0y+9oJTfmdZGY990f6 RBTrXGK3cGdk4diZ5rKFvHS3l1ZRtB9dqIY30Wz/pjM5XUpVtbCLE6lKNwS/aKMF+AJv afMCIDbt59LK2zIY750cSORmG+fKHF7tLlRGv4kV/kZ3zGk308DthBMU/1lJcFavxc1S v6prBC5DL2LYPbWgTO7jSo/i4ezIN/m1RvbX6AUf3lT929XV4ZIn9hdjYWabk9X0ygeu MveA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775887643; x=1776492443; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=g0W2dkhDE0DBYruk+1K3z7EcCO1MRKuGr7YTeE1lILQ=; b=ng6uyKkK6rpNH+hO0h7KS3hQvvUiPXfJ53JkhF5ptcnoEuyIOgK0qksgDdElyvkXHL xY/FjQS8uEbC7j5eE/pZFx3Es6nKU4aDlEl+54k6bKZ3++ydqytfM/vA8rT80WQZQCwb k+7P8gkgPXWWL8p611NQV199/m+6poUUCf675osDSYTPjr5Ni7WhwK2L7wNnJehzMGbC k4l2mX0M5gK/fwhFcAvKihLHXDKD7y/XlezNcgT/QNgHARQGXncgK5mas9UEe3RzMQva 1umiKQnSAUiWraEciQQnYocv515trMxdGWbePANp3xUIE/fCfPwPq25NHsqXCw9zrsj/ hz5w== X-Gm-Message-State: AOJu0Yyb9gqfvcCYTLKujTzBDZYYTJehSc/iHqT7vuOMI4g8FQICGfBd D6tZTu1KHs5PPPKVrMYPnS93JGdkFXBvsKXrdYiWV7uCTxLZGtpgpvJ2 X-Gm-Gg: AeBDiesNEiU53DBXoIhu6T2i+/DymylVJW258hNky9AYlpG1C4oAQKNsp9GgeqagGRy ZeCI4SdTncqZBldZlbaZlwEr/AWgUTV3JtKQjs4SfRk41b5n1Ij8o9gqAlbrc8pC+p6YZr6i/+7 cVzTQT8YQ77Oqle/C1HdhhBdJYMaQfLY/JvwrXc4Sv4vnTRWoq8FIGBnrw0h9FLeYH1Gb+gKd3+ Dko1ZPUG1+U1j9mm5zxoFYWN2tKXUGKVGk7dG9r2wHXqkRLxSKGCdQLRhYcUkHoikMXqlaWsyht J6gBI7gUwNIQVA2u4Nw1PpzS6CsnebHM9+IXdmQy8B28W6utEB7v1tEqfd6mHuTZge32kP0MSkA /nJD51U19HCSj8FCvxTRq4s7I/9nxFspod1shwUotJ1XxOf6jqrS1R4+9FPUb01qV1cEAVGHncN oSJlYU4xeLQlLEBS6zQaalxT488Zaz8TXZvmouudT1keKaim6Fe1JP5P25z8dqfXnyA3/d+LC0G 1WIOZwxhH0+C6SbNU69n60s2YJoaueJhz7HT+MBa/oqSYpB4O/CGtrM/11yNng= X-Received: by 2002:a05:600c:c0da:b0:488:caed:5cc7 with SMTP id 5b1f17b1804b1-488d68af041mr64170965e9.15.1775887642479; Fri, 10 Apr 2026 23:07:22 -0700 (PDT) Received: from smtpclient.apple (2a02-8429-e840-3201-943f-da3f-bf11-501a.rev.sfr.net. [2a02:8429:e840:3201:943f:da3f:bf11:501a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488d5888a97sm148324595e9.2.2026.04.10.23.07.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Apr 2026 23:07:21 -0700 (PDT) From: bertrand HARTWIG Message-Id: <873AFF54-57EA-4A69-985E-7478E25A502A@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_D860EA64-BA1B-4C55-A516-9D95DBA83C1A" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.400.21\)) Subject: Re: Seeking Advice: PostgreSQL Performance Troubleshooting Without Third-Party Tools Date: Sat, 11 Apr 2026 08:07:09 +0200 In-Reply-To: Cc: Pgsql-admin To: mahamood hussain References: X-Mailer: Apple Mail (2.3864.400.21) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_D860EA64-BA1B-4C55-A516-9D95DBA83C1A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hello Keith, For query analysis, optimization, and overall database performance = tuning, I recommend using pgAssistant: = https://github.com/beh74/pgassistant-community. It requires = pg_stat_statements but does not rely on pg_buffercache. For monitoring, I strongly recommend pg_watch: = https://github.com/cybertec-postgresql/pgwatch/. In my case, I use both tools daily across an environment of around 500 = PostgreSQL instances. They are clearly complementary: pgAssistant is = very effective for deep analysis and reporting, while pg_watch provides = robust monitoring and observability. I also leverage the pgAssistant API to automatically generate weekly = reports in Markdown format, which I then store in Git for versioning and = tracking. Both tools are available as Docker containers, which makes deployment = and scaling straightforward. Regards , =20 Bertrand > Le 10 avr. 2026 =C3=A0 19:48, mahamood hussain = a =C3=A9crit : >=20 > Hi Team, >=20 > We are currently working on a migration project from DB2 to = PostgreSQL. Post-migration, we=E2=80=99re observing several performance = issues such as long-running queries and occasional instance crashes. It = also appears that some application-side workloads may not be optimized = for PostgreSQL. >=20 > =46rom a DBA perspective, I=E2=80=99m looking to proactively identify = problem areas=E2=80=94such as: >=20 > Long-running queries > Jobs/stored procedures consuming high temp space > Queries resulting in sequential scans due to missing indexes > Lock waits, deadlocks, and memory-heavy operations > We already have key parameters enabled (pg_stat_statements, = pg_buffercache, etc.), and PostgreSQL is generating logs in .csv format. = However, the main challenge is efficiently analyzing these logs and = identifying performance bottlenecks at scale (databases ranging from = ~1TB to 15TB). >=20 > We currently don=E2=80=99t have third-party monitoring tools like = Datadog, so I=E2=80=99m looking for recommendations on free or = lightweight tools and best practices to: >=20 > Parse and analyze PostgreSQL logs (especially CSV logs) > Identify top resource-consuming queries and patterns > Correlate temp usage, memory pressure, and query behavior > Generate actionable insights for the engineering team > Any suggestions on tools, scripts, or approaches that have worked well = in similar large-scale environments would be greatly appreciated. >=20 --Apple-Mail=_D860EA64-BA1B-4C55-A516-9D95DBA83C1A Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Hello = Keith,

For query analysis, optimization, and = overall database performance tuning, I recommend using pgAssistant: = https://github.com/beh74/pgassistant-community. It requires = pg_stat_statements but does not rely on = pg_buffercache.

For monitoring, I strongly = recommend pg_watch: = https://github.com/cybertec-postgresql/pgwatch/.

= In my case, I use both tools daily across an environment of around 500 = PostgreSQL instances. They are clearly complementary: pgAssistant is = very effective for deep analysis and reporting, while pg_watch provides = robust monitoring and observability.

I also = leverage the pgAssistant API to automatically generate weekly reports in = Markdown format, which I then store in Git for versioning and = tracking.

Both tools are available as Docker = containers, which makes deployment and scaling = straightforward.

Regards
, =  
Bertrand

Le = 10 avr. 2026 =C3=A0 19:48, mahamood hussain = <hussain.ieg@gmail.com> a =C3=A9crit :

Hi = Team,

We are currently working on a migration project from DB2 to = PostgreSQL. Post-migration, we=E2=80=99re observing several performance = issues such as long-running queries and occasional instance crashes. It = also appears that some application-side workloads may not be optimized = for PostgreSQL.

=46rom a DBA perspective, I=E2=80=99m looking to = proactively identify problem areas=E2=80=94such as:

  • Long-running queries
  • Jobs/stored procedures consuming high temp space
  • Queries resulting in sequential scans due to missing indexes
  • Lock waits, deadlocks, and memory-heavy operations

We already have key parameters enabled = (pg_stat_statements, pg_buffercache, etc.), = and PostgreSQL is generating logs in .csv format. However, = the main challenge is efficiently analyzing these logs and identifying = performance bottlenecks at scale (databases ranging from ~1TB to = 15TB).

We currently don=E2=80=99t have third-party monitoring = tools like Datadog, so I=E2=80=99m looking for recommendations = on free or lightweight tools and best practices to:

  • Parse and analyze PostgreSQL logs (especially CSV logs)
  • Identify top resource-consuming queries and patterns
  • Correlate temp usage, memory pressure, and query behavior
  • Generate actionable insights for the engineering team

Any suggestions on tools, scripts, or approaches that have = worked well in similar large-scale environments would be greatly = appreciated.


= --Apple-Mail=_D860EA64-BA1B-4C55-A516-9D95DBA83C1A--