diff options
author | Amit Kapila <akapila@postgresql.org> | 2020-01-11 10:24:48 +0530 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2020-01-14 07:53:50 +0530 |
commit | ed7bb5c311ce059294807cf4abfa9406d95feec0 (patch) | |
tree | 5bffb42e68f164f9790f6be830be6ec7f47e74c5 /src | |
parent | 7f380c59f800f7e0fb49f45a6ff7787256851a59 (diff) | |
download | postgresql-ed7bb5c311ce059294807cf4abfa9406d95feec0.tar.gz postgresql-ed7bb5c311ce059294807cf4abfa9406d95feec0.zip |
Revert test added by commit d207038053.
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/6485.1578583522@sss.pgh.pa.us
Diffstat (limited to 'src')
-rw-r--r-- | src/test/recovery/t/006_logical_decoding.pl | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/src/test/recovery/t/006_logical_decoding.pl b/src/test/recovery/t/006_logical_decoding.pl index 216003ca53d..c23cc4dda76 100644 --- a/src/test/recovery/t/006_logical_decoding.pl +++ b/src/test/recovery/t/006_logical_decoding.pl @@ -7,7 +7,7 @@ use strict; use warnings; use PostgresNode; use TestLib; -use Test::More tests => 11; +use Test::More tests => 10; use Config; # Initialize master node @@ -135,43 +135,5 @@ is($node_master->psql('postgres', 'DROP DATABASE otherdb'), is($node_master->slot('otherdb_slot')->{'slot_name'}, undef, 'logical slot was actually dropped with DB'); -# Test to ensure that we don't run out of file descriptors even if there -# are more spill files than maxAllocatedDescs. - -# Set max_files_per_process to a small value to make it more likely to run out -# of max open file descriptors. -$node_master->safe_psql('postgres', - 'ALTER SYSTEM SET max_files_per_process = 26;'); -$node_master->restart; - -$node_master->safe_psql( - 'postgres', q{ -do $$ -BEGIN - FOR i IN 1..10 LOOP - BEGIN - INSERT INTO decoding_test(x) SELECT generate_series(1,5000); - EXCEPTION - when division_by_zero then perform 'dummy'; - END; - END LOOP; -END $$; -}); - -$result = $node_master->safe_psql('postgres', - qq[ -set logical_decoding_work_mem to 64; -- generate plenty of .spill files -SELECT data from pg_logical_slot_get_changes('test_slot', NULL, NULL) - WHERE data LIKE '%INSERT%' ORDER BY lsn LIMIT 1; -]); - -$expected = q{table public.decoding_test: INSERT: x[integer]:1 y[text]:null}; -is($result, $expected, 'got expected output from spilling subxacts session'); - -# Reset back max_files_per_process -$node_master->safe_psql('postgres', - 'ALTER SYSTEM SET max_files_per_process = DEFAULT;'); -$node_master->restart; - # done with the node $node_master->stop; |