postgresql/contrib/test_decoding
Andres Freund 626bfad6cc Fix decoding of consecutive MULTI_INSERTs emitted by one heap_multi_insert().
Commit 1b86c81d2d fixed the decoding of toasted columns for the rows
contained in one xl_heap_multi_insert record. But that's not actually
enough, because heap_multi_insert() will actually first toast all
passed in rows and then emit several *_multi_insert records; one for
each page it fills with tuples.

Add a XLOG_HEAP_LAST_MULTI_INSERT flag which is set in
xl_heap_multi_insert->flag denoting that this multi_insert record is
the last emitted by one heap_multi_insert() call. Then use that flag
in decode.c to only set clear_toast_afterwards in the right situation.

Expand the number of rows inserted via COPY in the corresponding
regression test to make sure that more than one heap page is filled
with tuples by one heap_multi_insert() call.

Backpatch to 9.4 like the previous commit.
2014-07-12 14:28:19 +02:00
..
expected Fix decoding of consecutive MULTI_INSERTs emitted by one heap_multi_insert(). 2014-07-12 14:28:19 +02:00
specs
sql Fix decoding of consecutive MULTI_INSERTs emitted by one heap_multi_insert(). 2014-07-12 14:28:19 +02:00
.gitignore test_decoding: Update .gitignore 2014-03-31 14:18:35 -04:00
logical.conf
Makefile Add test case for logical decoding of prepared transactions. 2014-05-16 11:34:50 +03:00
test_decoding.c Adjust blank lines around PG_MODULE_MAGIC defines, for consistency 2014-07-10 14:02:08 -04:00