Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2d76a09

Browse files
committed
test out
1 parent76666c3 commit2d76a09

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

‎contrib/test_decoding/expected/prepared.out

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ INSERT INTO test_prepared2 VALUES (9);
3939
DROP TABLE test_prepared1;
4040
DROP TABLE test_prepared2;
4141
-- show results
42-
SELECT data FROMpg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
42+
SELECT data FROMpg_logical_slot_peek_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
4343
data
4444
-------------------------------------------------------------------------
4545
BEGIN
@@ -66,6 +66,39 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
6666
COMMIT
6767
(22 rows)
6868

69+
-- same but with twophase decoding
70+
SELECT data FROM pg_logical_slot_peek_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'twophase-decoding', '1');
71+
data
72+
-------------------------------------------------------------------------
73+
BEGIN
74+
table public.test_prepared1: INSERT: id[integer]:1
75+
PREPARE 'test_prepared#1'
76+
COMMIT PREPARED 'test_prepared#1'
77+
BEGIN
78+
table public.test_prepared1: INSERT: id[integer]:2
79+
COMMIT
80+
BEGIN
81+
table public.test_prepared1: INSERT: id[integer]:3
82+
PREPARE 'test_prepared#2'
83+
ABORT PREPARED 'test_prepared#2'
84+
BEGIN
85+
table public.test_prepared1: INSERT: id[integer]:4
86+
COMMIT
87+
BEGIN
88+
table public.test_prepared1: INSERT: id[integer]:5
89+
table public.test_prepared1: INSERT: id[integer]:6 data[text]:'frakbar'
90+
PREPARE 'test_prepared#3'
91+
BEGIN
92+
table public.test_prepared2: INSERT: id[integer]:7
93+
COMMIT
94+
BEGIN
95+
table public.test_prepared1: INSERT: id[integer]:8 data[text]:null
96+
COMMIT
97+
BEGIN
98+
table public.test_prepared2: INSERT: id[integer]:9
99+
COMMIT
100+
(27 rows)
101+
69102
SELECT pg_drop_replication_slot('regression_slot');
70103
pg_drop_replication_slot
71104
--------------------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp