@@ -75,49 +75,75 @@ cd ../..
75
75
76
76
pkill -9 postgres
77
77
reinit_master
78
- # reinit_master2
78
+ reinit_master2
79
79
80
- # ./install/bin/psql <<SQL
81
- # CREATE EXTENSION pglogical;
82
- # SELECT pglogical.create_node(
83
- # node_name := 'provider1',
84
- # dsn := 'port=5432 dbname=stas'
85
- # );
86
- # SELECT pglogical.replication_set_add_all_tables('default', ARRAY['public']);
87
- # SQL
88
-
89
- # ./install/bin/psql -p 5433 <<SQL
90
- # CREATE EXTENSION pglogical;
91
- # SELECT pglogical.create_node(
92
- # node_name := 'subscriber1',
93
- # dsn := 'port=5433 dbname=stas'
94
- # );
95
- # SELECT pglogical.create_subscription(
96
- # subscription_name := 'subscription1',
97
- # provider_dsn := 'port=5432 dbname=stas'
98
- # );
99
- # SQL
80
+ ./install/bin/psql<< SQL
81
+ CREATE EXTENSION pglogical;
82
+ SELECT pglogical.create_node(
83
+ node_name := 'provider1',
84
+ dsn := 'port=5432 dbname=stas'
85
+ );
86
+ SELECT pglogical.replication_set_add_all_tables('default', ARRAY['public']);
87
+ SQL
100
88
101
- ./install/bin/psql -c" SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'pglogical_output');"
89
+ ./install/bin/psql -p 5433<< SQL
90
+ CREATE EXTENSION pglogical;
91
+ SELECT pglogical.create_node(
92
+ node_name := 'subscriber1',
93
+ dsn := 'port=5433 dbname=stas'
94
+ );
95
+ SELECT pglogical.create_subscription(
96
+ subscription_name := 'subscription1',
97
+ provider_dsn := 'port=5432 dbname=stas'
98
+ );
99
+ SQL
102
100
103
101
./install/bin/psql<< SQL
104
- begin;
105
- insert into t values (42);
106
- prepare transaction 'hellyeah';
107
- rollback prepared 'hellyeah';
102
+ select pg_sleep(2);
103
+ begin;
104
+ insert into t values (42);
105
+ prepare transaction 'hellyeah';
106
+ select * from pg_current_xlog_location();
107
+ select pg_stat_get_wal_senders();
108
+ select * from pg_current_xlog_location();
109
+ --select pg_sleep(3);
110
+ SQL
111
+
112
+ ./install/bin/psql -p 5433<< SQL
113
+ select * from pg_prepared_xacts;
114
+ --select * from t;
108
115
SQL
109
116
110
117
./install/bin/psql<< SQL
111
- SELECT * FROM pg_logical_slot_peek_changes('regression_slot',
112
- NULL, NULL,
113
- 'expected_encoding', 'UTF8',
114
- 'min_proto_version', '1',
115
- 'max_proto_version', '1',
116
- 'startup_params_format', '1',
117
- 'proto_format', 'json',
118
- 'no_txinfo', 't');
118
+ commit prepared 'hellyeah';
119
+ select pg_sleep(1);
119
120
SQL
120
121
122
+ ./install/bin/psql -p 5433<< SQL
123
+ select * from pg_prepared_xacts;
124
+ select * from t;
125
+ SQL
126
+
127
+ # ./install/bin/psql -c "SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'pglogical_output');"
128
+
129
+ # ./install/bin/psql <<SQL
130
+ # --begin;
131
+ # insert into t values (42);
132
+ # --prepare transaction 'hellyeah';
133
+ # --commit prepared 'hellyeah';
134
+ # SQL
135
+
136
+ # ./install/bin/psql <<SQL
137
+ # SELECT * FROM pg_logical_slot_peek_changes('regression_slot',
138
+ # NULL, NULL,
139
+ # 'expected_encoding', 'UTF8',
140
+ # 'min_proto_version', '1',
141
+ # 'max_proto_version', '1',
142
+ # 'startup_params_format', '1',
143
+ # 'proto_format', 'json',
144
+ # 'no_txinfo', 't');
145
+ # SQL
146
+
121
147
122
148
123
149