From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | Subhrajit Mutsuddi <subhrajitmutsuddi(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: Walsender getting klilled, ERROR: out of memory in server logs |
Date: | 2024-03-26 10:42:42 |
Message-ID: | d6f7e0a17f098f8cd7368a5eec719b981bb63e0e.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Tue, 2024-03-26 at 09:54 +0530, Subhrajit Mutsuddi wrote:
> I have a table test(id int, lobcol bytea), the REPLICA IDENTITY setting of the
> table is set to FULL. We are using the test_decoding plugin for logical decoding.
> We inserted a record with lobcol size of 256 MB. While updating that record with
> another lobcol value of 256 MB, we found in the server logs that the corresponding
> walsender process keeps getting killed and it shows 'out of memory' and this
> particular message repeats.
>
> [11349] ERROR: out of memory
> DETAIL: Cannot enlarge string buffer containing 1073741822 bytes by 1 more bytes.
>
> Can you please help me understand the cause of this issue ? If there are any
> relevant documentation links or any possible workaround please share it.
1B is the maximum amount of memory for an allocation in PostgreSQL.
With REPLICA IDENTITY FULL, the UPDATE has to contain both the old and the
new value for the "bytea". In text mode, a "bytea" is more than twice its
binary size, because it is encoded as a hexadecimal string.
You might have more luck if you create the subscription with the "binary"
option.
But it is mildly insane to use REPLICA IDENTITY FULL with such a table.
Create a primary key and use that as replica identity.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Tender Wang | 2024-03-26 12:09:12 | Re: BUG #18396: Assert in gistFindCorrectParent() fails on inserting large tuples into gist index |
Previous Message | Andrew Dunstan | 2024-03-26 10:07:20 | Re: BUG #18408: ERROR: could not load library |