Re: Performance Degradation (Table becomes bloat) During Repeated Bulk UPDATE Operations

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Jeyaprakash Rajamani <jeyaprakash(dot)rajamani(at)chainsys(dot)com>
Cc: Álvaro Herrera <alvherre(at)kurilemu(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Performance Degradation (Table becomes bloat) During Repeated Bulk UPDATE Operations
Date: 2026-06-23 01:19:41
Message-ID: CALj2ACWPe5B_X67+T+1AV48OxUVbW=mExQeYf-4X8tEhibEO=A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Mon, Jun 22, 2026 at 4:09 AM Jeyaprakash Rajamani
<jeyaprakash(dot)rajamani(at)chainsys(dot)com> wrote:
>
> Hi,
>
> > INFO: analyzing "q_cps_mdm_dm.stg_loader_analze5"
> > INFO: "stg_loader_analze5": scanned 30000 of 2563909 pages, containing
> > 40373 live rows and 39122 dead rows; 30000 rows in sample, 3450423
> > estimated total rows
>
> In the sample that ANALYZE saw, about half the rows are dead and
> the other half are live.
>
> That's a lot of bloat. You may want to wait a little bit more for older
> transactions to go away (or slots to move forward, if you have any)
> before running this vacuum.
>
> Are there any other solutions to resolve this?

It's hard to make specific suggestions without understanding the
actual root cause - what those older transactions are doing and when
they started. I would recommend checking pg_stat_activity and reading
through the vacuum documentation:
https://www.postgresql.org/docs/current/routine-vacuuming.html.

--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2026-06-23 01:20:32 Re: Fix HAVING-to-WHERE pushdown with mismatched operator families
Previous Message Masahiko Sawada 2026-06-23 01:06:07 Re: Make COPY format extendable: Extract COPY TO format implementations