Skip to content

Commit ab598cf

Browse files
committed
call dropdb --force to drop databases even if there are connections
this is a new flag since PostgreSQL 13, which attempts to "terminate all existing connections to the target database before dropping it"
1 parent 5883a4f commit ab598cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/support/acceptance/purge.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ def purge_foreman
1010

1111
apache_service_name = ['debian', 'ubuntu'].include?(os[:family]) ? 'apache2' : 'httpd'
1212
on default, "systemctl stop #{apache_service_name} dynflow-sidekiq@* foreman foreman-proxy", { :acceptable_exit_codes => [0, 5] }
13-
on default, 'runuser - postgres -c "dropdb foreman"', { :acceptable_exit_codes => [0, 1, 127] }
13+
on default, 'runuser - postgres -c "dropdb --force foreman"', { :acceptable_exit_codes => [0, 1, 127] }
1414
end

0 commit comments

Comments
 (0)