mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Add BEGIN/COMMIT for transactional messages during decoding.
In test_decoding module, when skip_empty_xacts option was specified, add BEGIN/COMMIT for transactional messages. This makes the handling of transactional messages consistent irrespective of whether skip_empty_xacts option was specified. We decided not to backpatch this change because skip_empty_xacts is primarily used to have consistent test results across different runs and this change won't help with that. Author: Vignesh C Reviewed-by: Ashutosh Bapat, Hou Zhijie Discussion: https://postgr.es/m/CAExHW5ujRhbOz6_aTq_jQA8NjeFqq9d_8G9viShWvXx8gdSXiQ@mail.gmail.com
This commit is contained in:
@ -58,17 +58,23 @@ SELECT 'ignorethis' FROM pg_logical_emit_message(true, 'test', 'czechtastic');
|
||||
ignorethis
|
||||
(1 row)
|
||||
|
||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'force-binary', '0', 'skip-empty-xacts', '1');
|
||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'force-binary', '0', 'skip-empty-xacts', '1', 'include-xids', '0');
|
||||
data
|
||||
--------------------------------------------------------------------
|
||||
BEGIN
|
||||
message: transactional: 1 prefix: test, sz: 4 content:msg1
|
||||
COMMIT
|
||||
message: transactional: 0 prefix: test, sz: 4 content:msg2
|
||||
message: transactional: 0 prefix: test, sz: 4 content:msg4
|
||||
message: transactional: 0 prefix: test, sz: 4 content:msg6
|
||||
BEGIN
|
||||
message: transactional: 1 prefix: test, sz: 4 content:msg5
|
||||
message: transactional: 1 prefix: test, sz: 4 content:msg7
|
||||
COMMIT
|
||||
BEGIN
|
||||
message: transactional: 1 prefix: test, sz: 11 content:czechtastic
|
||||
(7 rows)
|
||||
COMMIT
|
||||
(13 rows)
|
||||
|
||||
-- test db filtering
|
||||
\set prevdb :DBNAME
|
||||
|
Reference in New Issue
Block a user