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 1wBGWV-000tUz-0O for pgsql-admin@arkaria.postgresql.org; Fri, 10 Apr 2026 18:24:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wBGWT-00E1xZ-1Q for pgsql-admin@arkaria.postgresql.org; Fri, 10 Apr 2026 18:24:06 +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 1wBGWT-00E1xR-0D for pgsql-admin@lists.postgresql.org; Fri, 10 Apr 2026 18:24:06 +0000 Received: from mail-oa1-x29.google.com ([2001:4860:4864:20::29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wBGWR-00000000OkH-40G1 for pgsql-admin@lists.postgresql.org; Fri, 10 Apr 2026 18:24:05 +0000 Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-4094b31a037so1634088fac.1 for ; Fri, 10 Apr 2026 11:24:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775845441; cv=none; d=google.com; s=arc-20240605; b=U5xkSRwHoMHqfjWUpyjG5KRSqfzhpISBWmCSeDTOdRggGERWixj2UNNqACm1XK22Cd 34KFMRYGJ7FpS8BD2a/hY3cYfOBKaFccf1kIzD8EqrmlRHz8DwMMe9oSKmJ+vPB7WrNo DcH4S6ZLo8S6LqQtiec2J51mReU/omwftmPBQbjV1c0vtGhmczWZPQ/Ir+Rns98PmN6K zHUvWtToxVArZMwMRE2nHoSfhzZPg/oR0qJIKXJ1uG8HstT6wNon/GvfFEry3J3mJyrw /S9l/9E0+nCnJdErRxUoBPo39pxZrgnZOC3w7a5iSmS4QoPja28DBfnZgnIUkmFvFHeC mTwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=CAsLblJqTfuKiJ3vqVmwYEO/7nvE3Wo1iY6xZ23aQSI=; fh=druxZHa2fk4e6MLibibygn9AWWgeaAPo4m8Gpo2MBXU=; b=M6qE0seY0GME9Y2XqcJqTZmJWYlGvWl5ShVKBxs/btlEKJ1E859vA1O0pugAsQbZ1N vlCOYtDc2tHK1CEBvsQsJqK74zXgG489O29wOrGhO+VKvBmrZ0c7zyQ/icFwyy9uXlPz L7M3kWwesx3Jdrqq/rG8S2RC7hIhbMRvb37LB7tEUvfbpL11rkGL9TuY6EVPNcyrr424 AclPbwQWMnQgI2bVN3+siwOzxO6xZS5whsq/1OqkBw+uN5qti3V44/lRMQiBIcencWfK KrXvM7IDDRkbNsmZ1N28mHDzxi8K62XKR/SqjjuSAwM03/65o13301AQ73iDdDEjkXKd qOvw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775845441; x=1776450241; darn=lists.postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=CAsLblJqTfuKiJ3vqVmwYEO/7nvE3Wo1iY6xZ23aQSI=; b=peM/0U5x/qnuP7LsMp4wkG7hyuNPNzjLuUxtfGe09poaQ8KPfJ2lXUscHx8VL/GtHQ tZQBy2mstZNB6qF2SWnHtGuoVmtK21YzFBs3d2I70Ls0uxDL0hVhNUQLnT/CCigDU/hi uDv3ZM98LbUnJUGoLLPbFrPeR4qD9HcKxTRbYU5lIFSPdwsKGKnkeDl9FizmpxK/vhXY +xzBauSQfLsdrmVzlaZI5NJGahAwR2xDVH2T3YV4+UBsxOP/tjnKbXrm6Qj4iCWmP+ko q8PVX9HpY6iTuWESCCNWRsNnY2fCJXPjJSBm2HvzxI65y7FzaAUaWtrh2VpWXioNWdcQ tdlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775845441; x=1776450241; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CAsLblJqTfuKiJ3vqVmwYEO/7nvE3Wo1iY6xZ23aQSI=; b=HnpWBQgGgIOh2sBuVqoWwKAiaLQgYKf5vi/F000e6gt4vzM1F/QFLD2GGJf7/33dpl CShK7QzjmpOtUG3n/D/6vQXg+L5Xc2MDKmxRslVgupIx3E+W7wO0amt9OU3iZdwW+GZw f7/tFqsrhZS7Xv6OWOwu2z+oyR6Hzinw7f7vPEO4SRYhsdqMTshCOSNBKAY0x8xYCpRL IIGm2oKYhnoLd+PnU/ZfPmhENO7VEi1Ybzr3EvHoaqYxiEcgJLnbww7XwPL4x2ePKbmK oFyTKQIzkSe0CvPY2MsQIVqVi+uW4qNhNmGg+VrLhsAmqtLreCTw/51KVihFbj5brF8T RnaA== X-Gm-Message-State: AOJu0Yx9+8IGdLCE1XwFUgSH2HRP78dEYO4M3yw5e12OEygt3zIYuYEh mLZHBaCeG95LFqmuQsZEe25tXIaooMf/vNlHAuboPLvO4CGejg4UJ/v6/79/G1piY6hYjEdXtY5 MrBDCiGsP2Z/fy+T9YEnoYSuhG8OevjQyDE2J X-Gm-Gg: AeBDieuD3lNep1bIkN4zIZATd31UxP82WRhGk3mQvUtyPKb6XHSzslCRV0qM1M0weSF 44i71L94d6VqVlxpZI8NewoBAuDQw4apyW1GmZFAvHbQKUbGlnkrRwQ7G+s2kXB198+DAe3meHO X/x27v2lq4vXnivvwI/V43HgDvppmdwFHovewKjUh58YnZ+fFGh3DO5PUzJ1cyfoN9gS/10fjdA iis3oMHN3MBvShFRQS8+Tuva49NflxNQbFKVhoqtLGyJyNzTUM8RbcIA3YS+PzXA6rv4ra4nCTs mZIz7CUjGuwOMtjkeMU= X-Received: by 2002:a05:6870:1641:b0:417:4a6d:222d with SMTP id 586e51a60fabf-423e0d9719cmr2513429fac.5.1775845441524; Fri, 10 Apr 2026 11:24:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ron Johnson Date: Fri, 10 Apr 2026 14:23:50 -0400 X-Gm-Features: AQROBzCeS3XtmG-N8fek24cAhgIeP_3hs6lfGeufUb0VylDng0W-ffaMIKWPrk0 Message-ID: Subject: Re: Seeking Advice: PostgreSQL Performance Troubleshooting Without Third-Party Tools To: Pgsql-admin Content-Type: multipart/alternative; boundary="000000000000b7d8ab064f1f3cf3" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000b7d8ab064f1f3cf3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Apr 10, 2026 at 1:49=E2=80=AFPM mahamood hussain wrote: > 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 a= s > long-running queries and occasional instance crashes. It also appears tha= t > some application-side workloads may not be optimized for PostgreSQL. > > From a DBA perspective, I=E2=80=99m looking to proactively identify probl= em > 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_buffercach= e, > 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. > Have you set log_min_duration_statement to some number of milliseconds? When you do that, the query and its parameters show up in the log file. Grep for "duration:" to find statements taking longer than *threshold* milliseconds. Does it require some manual effort? Sure. But it's free. Barring that, try installing pgbadger. --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --000000000000b7d8ab064f1f3cf3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Apr 10, 2026 at 1:49=E2=80=AFPM m= ahamood hussain <hussain.ieg@gm= ail.com> wrote:

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.

From a DBA perspective, I=E2=80=99m looking to proactively identify prob= lem 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 <= code>.csv format. However, the main challenge is efficiently analyzi= ng these logs and identifying performance bottlenecks at scale (databases r= anging from ~1TB to 15TB).

We currently don=E2=80=99t have third-party monitoring tools like Datado= g, so I=E2=80=99m looking for recommendations on free or lightweigh= t 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 i= n similar large-scale environments would be greatly appreciated.

Have you set log_min_duration_statement to some num= ber of milliseconds?=C2=A0 When you do that, the query and its parameters s= how up in the log file.=C2=A0 Grep for "duration:" to find statem= ents taking longer than threshold=C2=A0milliseconds.

<= /div>
Does it require some manual effort?=C2=A0 Sure.=C2=A0 But it'= s free.

Barring that, try installing pgbadger.

--
Death to <Redacte= d>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!
--000000000000b7d8ab064f1f3cf3--