Skip to content

Commit 561bdf9

Browse files
committed
resolve conflicts caused by the merge of branch 'master_create_single_partition', fixes & refactoring
2 parents f8726be + d3dea68 commit 561bdf9

20 files changed

+1230
-601
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ OBJS = src/init.o src/relation_info.o src/utils.o src/partition_filter.o \
55
src/runtimeappend.o src/runtime_merge_append.o src/pg_pathman.o src/rangeset.o \
66
src/pl_funcs.o src/pl_range_funcs.o src/pl_hash_funcs.o src/pathman_workers.o \
77
src/hooks.o src/nodes_common.o src/xact_handling.o src/copy_stmt_hooking.o \
8-
src/planner_tree_modification.o src/debug_print.o src/pg_compat.o $(WIN32RES)
8+
src/planner_tree_modification.o src/debug_print.o src/pg_compat.o \
9+
src/partition_creation.o $(WIN32RES)
910

1011
EXTENSION = pg_pathman
1112
EXTVERSION = 1.1

expected/pathman_basic.out

Lines changed: 25 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ EXPLAIN (COSTS OFF) SELECT * FROM test.range_rel WHERE dt BETWEEN '2014-12-15' A
11801180
(3 rows)
11811181

11821182
SELECT pathman.add_range_partition('test.range_rel', '2014-12-01'::DATE, '2015-01-02'::DATE);
1183-
ERROR: specified range overlaps with existing partitions
1183+
ERROR: specified range [12-01-2014, 01-02-2015) overlaps with existing partitions
11841184
SELECT pathman.add_range_partition('test.range_rel', '2014-12-01'::DATE, '2015-01-01'::DATE);
11851185
add_range_partition
11861186
---------------------
@@ -1199,7 +1199,7 @@ EXPLAIN (COSTS OFF) SELECT * FROM test.range_rel WHERE dt BETWEEN '2014-12-15' A
11991199

12001200
CREATE TABLE test.range_rel_archive (LIKE test.range_rel INCLUDING ALL);
12011201
SELECT pathman.attach_range_partition('test.range_rel', 'test.range_rel_archive', '2014-01-01'::DATE, '2015-01-01'::DATE);
1202-
ERROR: specified range overlaps with existing partitions
1202+
ERROR: specified range [01-01-2014, 01-01-2015) overlaps with existing partitions
12031203
SELECT pathman.attach_range_partition('test.range_rel', 'test.range_rel_archive', '2014-01-01'::DATE, '2014-12-01'::DATE);
12041204
attach_range_partition
12051205
------------------------
@@ -1427,48 +1427,28 @@ SELECT pathman.create_range_partitions('test.num_range_rel', 'id', 1000, 1000, 4
14271427
4
14281428
(1 row)
14291429

1430-
SELECT pathman.check_overlap('test.num_range_rel'::regclass::oid, 4001, 5000);
1431-
check_overlap
1432-
---------------
1433-
t
1434-
(1 row)
1435-
1436-
SELECT pathman.check_overlap('test.num_range_rel'::regclass::oid, 4000, 5000);
1437-
check_overlap
1438-
---------------
1439-
t
1440-
(1 row)
1441-
1442-
SELECT pathman.check_overlap('test.num_range_rel'::regclass::oid, 3999, 5000);
1443-
check_overlap
1444-
---------------
1445-
t
1446-
(1 row)
1447-
1448-
SELECT pathman.check_overlap('test.num_range_rel'::regclass::oid, 3000, 3500);
1449-
check_overlap
1450-
---------------
1451-
t
1452-
(1 row)
1453-
1454-
SELECT pathman.check_overlap('test.num_range_rel'::regclass::oid, 0, 999);
1455-
check_overlap
1456-
---------------
1457-
f
1458-
(1 row)
1459-
1460-
SELECT pathman.check_overlap('test.num_range_rel'::regclass::oid, 0, 1000);
1461-
check_overlap
1462-
---------------
1463-
f
1430+
SELECT pathman.check_range_available('test.num_range_rel'::regclass, 4001, 5000);
1431+
ERROR: specified range [4001, 5000) overlaps with existing partitions
1432+
SELECT pathman.check_range_available('test.num_range_rel'::regclass, 4000, 5000);
1433+
ERROR: specified range [4000, 5000) overlaps with existing partitions
1434+
SELECT pathman.check_range_available('test.num_range_rel'::regclass, 3999, 5000);
1435+
ERROR: specified range [3999, 5000) overlaps with existing partitions
1436+
SELECT pathman.check_range_available('test.num_range_rel'::regclass, 3000, 3500);
1437+
ERROR: specified range [3000, 3500) overlaps with existing partitions
1438+
SELECT pathman.check_range_available('test.num_range_rel'::regclass, 0, 999);
1439+
check_range_available
1440+
-----------------------
1441+
14641442
(1 row)
14651443

1466-
SELECT pathman.check_overlap('test.num_range_rel'::regclass::oid, 0, 1001);
1467-
check_overlap
1468-
---------------
1469-
t
1444+
SELECT pathman.check_range_available('test.num_range_rel'::regclass, 0, 1000);
1445+
check_range_available
1446+
-----------------------
1447+
14701448
(1 row)
14711449

1450+
SELECT pathman.check_range_available('test.num_range_rel'::regclass, 0, 1001);
1451+
ERROR: specified range [0, 1001) overlaps with existing partitions
14721452
/* CaMeL cAsE table names and attributes */
14731453
CREATE TABLE test."TeSt" (a INT NOT NULL, b INT);
14741454
SELECT pathman.create_hash_partitions('test.TeSt', 'a', 3);
@@ -1950,31 +1930,31 @@ NOTICE: sequence "index_on_childs_seq" does not exist, skipping
19501930
SELECT add_range_partition('test.index_on_childs', 1, 1000, 'test.index_on_childs_1_1K');
19511931
add_range_partition
19521932
---------------------------
1953-
test.index_on_childs_1_1K
1933+
test.index_on_childs_1_1k
19541934
(1 row)
19551935

19561936
SELECT append_range_partition('test.index_on_childs', 'test.index_on_childs_1K_2K');
19571937
append_range_partition
19581938
----------------------------
1959-
test.index_on_childs_1K_2K
1939+
test.index_on_childs_1k_2k
19601940
(1 row)
19611941

19621942
SELECT append_range_partition('test.index_on_childs', 'test.index_on_childs_2K_3K');
19631943
append_range_partition
19641944
----------------------------
1965-
test.index_on_childs_2K_3K
1945+
test.index_on_childs_2k_3k
19661946
(1 row)
19671947

19681948
SELECT append_range_partition('test.index_on_childs', 'test.index_on_childs_3K_4K');
19691949
append_range_partition
19701950
----------------------------
1971-
test.index_on_childs_3K_4K
1951+
test.index_on_childs_3k_4k
19721952
(1 row)
19731953

19741954
SELECT append_range_partition('test.index_on_childs', 'test.index_on_childs_4K_5K');
19751955
append_range_partition
19761956
----------------------------
1977-
test.index_on_childs_4K_5K
1957+
test.index_on_childs_4k_5k
19781958
(1 row)
19791959

19801960
SELECT set_enable_parent('test.index_on_childs', true);

expected/pathman_calamity.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,12 @@ SELECT invoke_on_partition_created_callback('calamity.part_test', 'calamity.part
171171
(1 row)
172172

173173
SELECT invoke_on_partition_created_callback(NULL, 'calamity.part_test', 1);
174-
ERROR: parent_relid should not be null
174+
ERROR: 'parent_relid' should not be NULL
175175
SELECT invoke_on_partition_created_callback('calamity.part_test', NULL, 1);
176-
ERROR: partition should not be null
176+
ERROR: 'partition' should not be NULL
177177
/* check function add_to_pathman_config() -- PHASE #1 */
178178
SELECT add_to_pathman_config('calamity.part_test', NULL);
179-
ERROR: attname should not be null
179+
ERROR: 'attname' should not be NULL
180180
SELECT add_to_pathman_config('calamity.part_test', 'val');
181181
add_to_pathman_config
182182
-----------------------

hash.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* ------------------------------------------------------------------------
22
*
33
* hash.sql
4-
* HASH partitioning functions
4+
* HASH partitioning functions
55
*
66
* Copyright (c) 2015-2016, Postgres Professional
77
*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy