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

Commit8de9ace

Browse files
committed
pathman: initialization check added
1 parent4299f24 commit8de9ace

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

‎contrib/pathman/init.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ load_check_constraints(Oid parent_oid)
292292
{
293293
if (ranges[i].max>ranges[i+1].min)
294294
{
295-
elog(WARNING,"Partitions %u and %u overlap. Disabling pathman for relation %u..",
295+
elog(WARNING,"Partitions %u and %u overlap. Disabling pathman for relation %u...",
296296
ranges[i].child_oid,ranges[i+1].child_oid,parent_oid);
297297
hash_search(relations, (constvoid*)&parent_oid,HASH_REMOVE,&found);
298298
}

‎contrib/pathman/pathman.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include"pathman.h"
22
#include"postgres.h"
33
#include"fmgr.h"
4+
#include"miscadmin.h"
45
#include"nodes/nodeFuncs.h"
56
#include"nodes/pg_list.h"
67
#include"nodes/relation.h"
@@ -100,6 +101,14 @@ static void set_pathkeys(PlannerInfo *root, RelOptInfo *childrel, Path *path);
100101
void
101102
_PG_init(void)
102103
{
104+
if (IsUnderPostmaster)
105+
{
106+
elog(ERROR,"Pathman module must be initialized in postmaster. "
107+
"Put the following line to configuration file: "
108+
"shared_preload_library = 'pathman'");
109+
initialization_needed= false;
110+
}
111+
103112
set_rel_pathlist_hook_original=set_rel_pathlist_hook;
104113
set_rel_pathlist_hook=pathman_set_rel_pathlist_hook;
105114
shmem_startup_hook_original=shmem_startup_hook;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp