Re: [BUG] Excessive memory usage with update on STORED generated columns.

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Anton A(dot) Melnikov" <a(dot)melnikov(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Eisentraut <peter(at)eisentraut(dot)org>
Subject: Re: [BUG] Excessive memory usage with update on STORED generated columns.
Date: 2026-12-05 04:53:43
Message-ID: CAGRkXqRRE=XCeh088=fOq-1Nt3fwcJewDRsa7n2nxsgE_NwVEQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Tom,

Here are patches along the lines you suggested.

0001 adds valid flags for the INSERT and UPDATE generated column setup,
which also fixes the same leak in MERGE and ON CONFLICT DO UPDATE.

0002 is for master only and groups the generated column fields in
ResultRelInfo,
as you proposed.

Thanks,
Shihao

Attachment Content-Type Size
v1-0002-Group-generated-column-fields-in-ResultRelInfo.patch application/octet-stream 3.2 KB
v1-0001-Fix-per-row-re-initialization-of-stored-generated.patch application/octet-stream 8.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message shihao zhong 2026-12-05 04:59:57 Re: pg_rewind reports "no rewind required" due to stale minRecoveryPoint
Previous Message shihao zhong 2026-12-05 04:48:35 Re: REPACK (CONCURRENTLY): do not block the table while waiting for the final lock