Daniel Gustafsson <daniel(at)yesql(dot)se> writes:
>> On 15 Nov 2026, at 05:49, PG Bug reporting form <noreply(at)postgresql(dot)org> wrote:
>> Clamping len
>> to MaxAllocSize - VARHDRSZ (or raising "requested length too large" before
>> the allocation, as lo_get() style paths do) would give a proper message.
> As far as bugs go, this is pretty low on the prioritylist; but since I had a
> look at it I think we should error out like lo_get().
Is it really worth the trouble at all? (It's not just your time to
commit this, it's that you're loading more work on the translators.)
I don't see any non-nefarious case in which we'd hit this error,
so letting the palloc error come out seems fine to me.
regards, tom lane