-
Notifications
You must be signed in to change notification settings - Fork 695
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop background daemon before dropping the database (#6688)
DESCRIPTION: Stop maintenance daemon when dropping a database even without Citus extension Fixes #6670
- Loading branch information
1 parent
c7f8c5d
commit b6a4652
Showing
4 changed files
with
107 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
-- coordinator | ||
CREATE SCHEMA drop_database; | ||
SET search_path TO drop_database; | ||
SET citus.shard_count TO 4; | ||
SET citus.shard_replication_factor TO 1; | ||
SET citus.next_shard_id TO 35137400; | ||
CREATE DATABASE citus_created; | ||
NOTICE: Citus partially supports CREATE DATABASE for distributed databases | ||
DETAIL: Citus does not propagate CREATE DATABASE command to workers | ||
HINT: You can manually create a database and its extensions on workers. | ||
\c citus_created | ||
CREATE EXTENSION citus; | ||
CREATE DATABASE citus_not_created; | ||
NOTICE: Citus partially supports CREATE DATABASE for distributed databases | ||
DETAIL: Citus does not propagate CREATE DATABASE command to workers | ||
HINT: You can manually create a database and its extensions on workers. | ||
\c citus_not_created | ||
DROP DATABASE citus_created; | ||
\c regression | ||
DROP DATABASE citus_not_created; | ||
-- worker1 | ||
\c - - - :worker_1_port | ||
SET search_path TO drop_database; | ||
SET citus.shard_count TO 4; | ||
SET citus.shard_replication_factor TO 1; | ||
SET citus.next_shard_id TO 35137400; | ||
CREATE DATABASE citus_created; | ||
NOTICE: Citus partially supports CREATE DATABASE for distributed databases | ||
DETAIL: Citus does not propagate CREATE DATABASE command to workers | ||
HINT: You can manually create a database and its extensions on workers. | ||
\c citus_created | ||
CREATE EXTENSION citus; | ||
CREATE DATABASE citus_not_created; | ||
NOTICE: Citus partially supports CREATE DATABASE for distributed databases | ||
DETAIL: Citus does not propagate CREATE DATABASE command to workers | ||
HINT: You can manually create a database and its extensions on workers. | ||
\c citus_not_created | ||
DROP DATABASE citus_created; | ||
\c regression | ||
DROP DATABASE citus_not_created; | ||
\c - - - :master_port | ||
SET client_min_messages TO WARNING; | ||
DROP SCHEMA drop_database CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,3 +121,4 @@ test: ensure_no_shared_connection_leak | |
test: check_mx | ||
|
||
test: generated_identity | ||
test: drop_database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
-- coordinator | ||
CREATE SCHEMA drop_database; | ||
SET search_path TO drop_database; | ||
SET citus.shard_count TO 4; | ||
SET citus.shard_replication_factor TO 1; | ||
SET citus.next_shard_id TO 35137400; | ||
|
||
CREATE DATABASE citus_created; | ||
|
||
\c citus_created | ||
CREATE EXTENSION citus; | ||
|
||
CREATE DATABASE citus_not_created; | ||
|
||
\c citus_not_created | ||
DROP DATABASE citus_created; | ||
|
||
\c regression | ||
DROP DATABASE citus_not_created; | ||
|
||
-- worker1 | ||
\c - - - :worker_1_port | ||
|
||
SET search_path TO drop_database; | ||
SET citus.shard_count TO 4; | ||
SET citus.shard_replication_factor TO 1; | ||
SET citus.next_shard_id TO 35137400; | ||
|
||
CREATE DATABASE citus_created; | ||
|
||
\c citus_created | ||
CREATE EXTENSION citus; | ||
|
||
CREATE DATABASE citus_not_created; | ||
|
||
\c citus_not_created | ||
DROP DATABASE citus_created; | ||
|
||
\c regression | ||
DROP DATABASE citus_not_created; | ||
|
||
\c - - - :master_port | ||
|
||
SET client_min_messages TO WARNING; | ||
DROP SCHEMA drop_database CASCADE; |