[BUG] pg9.4.10 Logical decoding did not get the correct oldtuplelen
158306855 <anderson2013@qq.com>
From: anderson <anderson2013@qq.com>
To: pgsql-bugs <pgsql-bugs@postgresql.org>
Date: 2016-12-27T03:30:47Z
Lists: pgsql-bugs
hi team:
I found a postgresql 9.4.10 Logical decoding problem
heapam.c:6976 xlog store incorrect oldtuplen when tuplelen is greater than the value field of uint16.
a uint32 variable is assigned to uint16
The structure that holds the oldkey length is:
typedef struct xl_heap_header_len
{
uint16 t_len;
xl_heap_header header;
} xl_heap_header_len;
The problem will lead to logic decoding failure when oldtuplene > 65535 and relreplident = FULL.
The table that triggers the problem is usually relreplident = FULL.
Commits
-
Fix issues with wide tuples being updated and REPLICA IDENTITY FULL.
- 23a2b818f50f 9.4.13 landed
-
Revamp the WAL record format.
- 2c03216d8311 9.5.0 cited