Skip to content

Commit ed7bb5c

Browse files
author
Amit Kapila
committed
Revert test added by commit d207038.
This test was trying to test the mechanism to release kernel FDs as needed to get us under the max_safe_fds limit in case of spill files. To do that, it needs to set max_files_per_process to a very low value which doesn't even permit starting of the server in the case when there are a few already opened files. This test also won't work on platforms where we use one FD per semaphore. Backpatch-through: 10, till where this test was added Discussion: https://postgr.es/m/CAA4eK1LHhERi06Q+MmP9qBXBBboi+7WV3910J0aUgz71LcnKAw@mail.gmail.com https://postgr.es/m/[email protected]
1 parent 7f380c5 commit ed7bb5c

File tree

1 file changed

+1
-39
lines changed

1 file changed

+1
-39
lines changed

src/test/recovery/t/006_logical_decoding.pl

+1-39
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use warnings;
88
use PostgresNode;
99
use TestLib;
10-
use Test::More tests => 11;
10+
use Test::More tests => 10;
1111
use Config;
1212

1313
# Initialize master node
@@ -135,43 +135,5 @@
135135
is($node_master->slot('otherdb_slot')->{'slot_name'},
136136
undef, 'logical slot was actually dropped with DB');
137137

138-
# Test to ensure that we don't run out of file descriptors even if there
139-
# are more spill files than maxAllocatedDescs.
140-
141-
# Set max_files_per_process to a small value to make it more likely to run out
142-
# of max open file descriptors.
143-
$node_master->safe_psql('postgres',
144-
'ALTER SYSTEM SET max_files_per_process = 26;');
145-
$node_master->restart;
146-
147-
$node_master->safe_psql(
148-
'postgres', q{
149-
do $$
150-
BEGIN
151-
FOR i IN 1..10 LOOP
152-
BEGIN
153-
INSERT INTO decoding_test(x) SELECT generate_series(1,5000);
154-
EXCEPTION
155-
when division_by_zero then perform 'dummy';
156-
END;
157-
END LOOP;
158-
END $$;
159-
});
160-
161-
$result = $node_master->safe_psql('postgres',
162-
qq[
163-
set logical_decoding_work_mem to 64; -- generate plenty of .spill files
164-
SELECT data from pg_logical_slot_get_changes('test_slot', NULL, NULL)
165-
WHERE data LIKE '%INSERT%' ORDER BY lsn LIMIT 1;
166-
]);
167-
168-
$expected = q{table public.decoding_test: INSERT: x[integer]:1 y[text]:null};
169-
is($result, $expected, 'got expected output from spilling subxacts session');
170-
171-
# Reset back max_files_per_process
172-
$node_master->safe_psql('postgres',
173-
'ALTER SYSTEM SET max_files_per_process = DEFAULT;');
174-
$node_master->restart;
175-
176138
# done with the node
177139
$node_master->stop;

0 commit comments

Comments
 (0)