Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7e22540

Browse files
committed
add test case for DROP INDEX CONCURRENTLY
1 parent86e280c commit7e22540

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

‎expected/pathman_calamity.out

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,25 @@ SELECT context, entries FROM pathman_cache_stats ORDER BY context;/* OK */
10431043

10441044
DROP SCHEMA calamity CASCADE;
10451045
DROP EXTENSION pg_pathman;
1046+
/*
1047+
* -----------------------------------------------------------
1048+
* Special tests (drop index concurrently to test snapshots)
1049+
* -----------------------------------------------------------
1050+
*/
1051+
CREATE SCHEMA calamity;
1052+
CREATE EXTENSION pg_pathman;
1053+
CREATE TABLE calamity.drop_index (val INT4 NOT NULL);
1054+
CREATE INDEX ON calamity.drop_index (val);
1055+
SELECT create_hash_partitions('calamity.drop_index', 'val', 2);
1056+
create_hash_partitions
1057+
------------------------
1058+
2
1059+
(1 row)
1060+
1061+
DROP INDEX CONCURRENTLY calamity.drop_index_0_val_idx;
1062+
DROP SCHEMA calamity CASCADE;
1063+
NOTICE: drop cascades to 3 other objects
1064+
DROP EXTENSION pg_pathman;
10461065
/*
10471066
* ------------------------------------------
10481067
* Special tests (uninitialized pg_pathman)

‎sql/pathman_calamity.sql

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,25 @@ DROP EXTENSION pg_pathman;
422422

423423

424424

425+
/*
426+
* -----------------------------------------------------------
427+
* Special tests (drop index concurrently to test snapshots)
428+
* -----------------------------------------------------------
429+
*/
430+
431+
CREATESCHEMAcalamity;
432+
CREATE EXTENSION pg_pathman;
433+
434+
CREATETABLEcalamity.drop_index (val INT4NOT NULL);
435+
CREATEINDEXONcalamity.drop_index (val);
436+
SELECT create_hash_partitions('calamity.drop_index','val',2);
437+
DROPINDEX CONCURRENTLYcalamity.drop_index_0_val_idx;
438+
439+
DROPSCHEMA calamity CASCADE;
440+
DROP EXTENSION pg_pathman;
441+
442+
443+
425444
/*
426445
* ------------------------------------------
427446
* Special tests (uninitialized pg_pathman)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp