|
7 | 7 | use warnings;
|
8 | 8 | use PostgresNode;
|
9 | 9 | use TestLib;
|
10 |
| -use Test::More tests => 11; |
| 10 | +use Test::More tests => 10; |
11 | 11 | use Config;
|
12 | 12 |
|
13 | 13 | # Initialize master node
|
|
133 | 133 | is($node_master->slot('otherdb_slot')->{'slot_name'},
|
134 | 134 | undef, 'logical slot was actually dropped with DB');
|
135 | 135 |
|
136 |
| -# Test to ensure that we don't run out of file descriptors even if there |
137 |
| -# are more spill files than maxAllocatedDescs. |
138 |
| - |
139 |
| -# Set max_files_per_process to a small value to make it more likely to run out |
140 |
| -# of max open file descriptors. |
141 |
| -$node_master->safe_psql('postgres', |
142 |
| - 'ALTER SYSTEM SET max_files_per_process = 26;'); |
143 |
| -$node_master->restart; |
144 |
| - |
145 |
| -$node_master->safe_psql( |
146 |
| - 'postgres', q{ |
147 |
| -do $$ |
148 |
| -BEGIN |
149 |
| - FOR i IN 1..10 LOOP |
150 |
| - BEGIN |
151 |
| - INSERT INTO decoding_test(x) SELECT generate_series(1,5000); |
152 |
| - EXCEPTION |
153 |
| - when division_by_zero then perform 'dummy'; |
154 |
| - END; |
155 |
| - END LOOP; |
156 |
| -END $$; |
157 |
| -}); |
158 |
| - |
159 |
| -$result = $node_master->safe_psql('postgres', |
160 |
| - qq[ |
161 |
| -SELECT data from pg_logical_slot_get_changes('test_slot', NULL, NULL) |
162 |
| - WHERE data LIKE '%INSERT%' ORDER BY lsn LIMIT 1; |
163 |
| -]); |
164 |
| - |
165 |
| -$expected = q{table public.decoding_test: INSERT: x[integer]:1 y[text]:null}; |
166 |
| -is($result, $expected, 'got expected output from spilling subxacts session'); |
167 |
| - |
168 |
| -# Reset back max_files_per_process |
169 |
| -$node_master->safe_psql('postgres', |
170 |
| - 'ALTER SYSTEM SET max_files_per_process = DEFAULT;'); |
171 |
| -$node_master->restart; |
172 |
| - |
173 | 136 | # done with the node
|
174 | 137 | $node_master->stop;
|
0 commit comments