postgresql/contrib/test_decoding/sql
Andres Freund 23a2b818f5 Fix issues with wide tuples being updated and REPLICA IDENTITY FULL.
When replica identity full is being used with a wide tuple (above 2^16
bytes after compression) it lead to errors and/or crashes during
decoding because the length field used to store such tuples doesn't
fit into the variable used to store the width in the WAL record.

To fix, discontinue use of xl_heap_header_len.t_len when decoding the
old tuple version, instead compute length of the old tuple by
subtracting the new tuple's length from the record length.

In newer version of postgres this issue is moot because the length is
stored by the new WAL machinery, instead of a xl_heap_header_len
struct.  A separate commit will forward-patch the regression test.

Reported-By: "anderson"
Discussion: http://postgr.es/m/20170105144819.f6i5o64vfvy4bn5i@alap3.anarazel.de
2017-08-05 14:56:40 -07:00
..
binary.sql test_decoding: Protect against rare spurious test failures. 2015-09-22 15:47:53 +02:00
ddl.sql Fix core dump in ReorderBufferRestoreChange on alignment-picky platforms. 2016-04-14 19:42:22 -04:00
decoding_in_xact.sql Add skip-empty-xacts option to test_decoding for use in the regression tests. 2014-09-01 16:08:57 +02:00
decoding_into_rel.sql Don't skip SQL backends in logical decoding for visibility computation. 2014-12-02 23:52:44 +01:00
permissions.sql Add skip-empty-xacts option to test_decoding for use in the regression tests. 2014-09-01 16:08:57 +02:00
prepared.sql Add skip-empty-xacts option to test_decoding for use in the regression tests. 2014-09-01 16:08:57 +02:00
rewrite.sql Add skip-empty-xacts option to test_decoding for use in the regression tests. 2014-09-01 16:08:57 +02:00
spill.sql Make contrib/test_decoding regression tests safe for CZ locale. 2016-11-21 20:39:28 -05:00
toast.sql Fix issues with wide tuples being updated and REPLICA IDENTITY FULL. 2017-08-05 14:56:40 -07:00
xact.sql Don't propagate a null subtransaction snapshot up to parent transaction. 2016-08-07 13:15:55 -04:00