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

Commit4ddfbb5

Browse files
committed
introduce new function xact_conflicting_lock_exists(), rename functions related to concurrent partitioning, split worker.c into pathman_workers.c & pathman_workers.h, medium refactoring & fixes
2 parents0084ae6 +67d8a5d commit4ddfbb5

18 files changed

+908
-591
lines changed

‎Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
MODULE_big = pg_pathman
44
OBJS = src/init.o src/relation_info.o src/utils.o src/partition_filter.o src/runtimeappend.o\
55
src/runtime_merge_append.o src/pg_pathman.o src/dsm_array.o src/rangeset.o src/pl_funcs.o\
6-
src/worker.o src/hooks.o src/nodes_common.o$(WIN32RES)
6+
src/pathman_workers.o src/hooks.o src/nodes_common.o src/xact_handling.o$(WIN32RES)
77

88
EXTENSION = pg_pathman
99
EXTVERSION = 0.1

‎hash.sql

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ CREATE OR REPLACE FUNCTION @extschema@.create_hash_partitions(
1515
parent_relidREGCLASS,
1616
attributeTEXT,
1717
partitions_countINTEGER,
18-
partition_dataBOOLEAN DEFAULT true
19-
)RETURNSINTEGERAS
18+
partition_dataBOOLEAN DEFAULT true)
19+
RETURNSINTEGERAS
2020
$$
2121
DECLARE
2222
v_child_relnameTEXT;
@@ -26,6 +26,9 @@ DECLARE
2626
v_hashfuncTEXT;
2727

2828
BEGIN
29+
/* Acquire exclusive lock on parent*/
30+
PERFORM @extschema@.lock_partitioned_relation(parent_relid);
31+
2932
PERFORM @extschema@.validate_relname(parent_relid);
3033
attribute :=lower(attribute);
3134
PERFORM @extschema@.common_relation_checks(parent_relid, attribute);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp