Re: Proposal: Conflict log history table for Logical Replication - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: Proposal: Conflict log history table for Logical Replication
Date
Msg-id CAFiTN-sdedotL28eFTeNX8_zVpn2o=u-SJ+t4W_wrPx_syAA6g@mail.gmail.com
Whole thread
In response to Re: Proposal: Conflict log history table for Logical Replication  (shveta malik <shveta.malik@gmail.com>)
Responses Add TG_* vars for FOR PORTION OF
List pgsql-hackers
On Wed, Aug 26, 2026 at 8:01 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:
>
Updated version of 0002, based on offlist testing by Nisha, revealed
that the assumption that a column's maximum size could become 6x its
original size during JSON conversion is incorrect. One edge case is a
column of type array (int[]). A huge array but mostly empty(all NULL),
can have a small storage size but produce a much larger JSON since
each element is serialized. For example
 - A 4096 byte text column becomes ~24KB json (6x), which stays under
the budget even accumulated across all columns (24,554 × 1600 × 3 ≈
118 MB).
 - But a 4096 byte all-NULL int[] column can produce ~480KB(120x) of
json in a edge case.
Based on this, Amit suggested a offlist POC of the patch which Nisha
and I further modified. It still needs more review, testing, and logic
validation, but I am sharing it here so we can review and provide
feedback.

--
Regards,
Dilip Kumar
Google

Attachment

pgsql-hackers by date:

Previous
From: JoongHyuk Shin
Date:
Subject: Re: [PATCH] Prevent repeated deadlock-check signals in standby buffer pin waits
Next
From: Nathan Bossart
Date:
Subject: Re: REPACK (ANALYZE) within transaction block segfaults