@@ -75,49 +75,75 @@ cd ../..
7575
7676pkill -9 postgres
7777reinit_master
78- # reinit_master2
78+ reinit_master2
7979
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
10088
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
102100
103101./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;
108115SQL
109116
110117./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);
119120SQL
120121
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+
121147
122148
123149
0 commit comments