mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-15 05:33:23 +02:00
When decoding the old version of an UPDATE or DELETE change, and if that tuple was bigger than MaxHeapTupleSize, we either Assert'ed out, or failed in more subtle ways in non-assert builds. Normally individual tuples aren't bigger than MaxHeapTupleSize, with big datums toasted. But that's not the case for the old version of a tuple for logical decoding; the replica identity is logged as one piece. With the default replica identity btree limits that to small tuples, but that's not the case for FULL. Change the tuple buffer infrastructure to separate allocate over-large tuples, instead of always going through the slab cache. This unfortunately requires changing the ReorderBufferTupleBuf definition, we need to store the allocated size someplace. To avoid requiring output plugins to recompile, don't store HeapTupleHeaderData directly after HeapTupleData, but point to it via t_data; that leaves rooms for the allocated size. As there's no reason for an output plugin to look at ReorderBufferTupleBuf->t_data.header, remove the field. It was just a minor convenience having it directly accessible. Reported-By: Adam Dratwiński Discussion: CAKg6ypLd7773AOX4DiOGRwQk1TVOQKhNwjYiVjJnpq8Wo+i62Q@mail.gmail.com |
||
---|---|---|
.. | ||
binary.out | ||
concurrent_ddl_dml.out | ||
ddl.out | ||
decoding_in_xact.out | ||
decoding_into_rel.out | ||
delayed_startup.out | ||
mxact.out | ||
ondisk_startup.out | ||
permissions.out | ||
prepared.out | ||
replorigin.out | ||
rewrite.out | ||
time.out | ||
toast.out | ||
xact.out |