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

Commit4bc7d78

Browse files
committed
pathman: check if pathman is in shared_preload_libraries
1 parent2f143bd commit4bc7d78

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

‎contrib/pg_pathman/init.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,15 @@ init_shmem_config()
4444
pmstate->dsm_init_lock=LWLockAssign();
4545
pmstate->edit_partitions_lock=LWLockAssign();
4646
}
47+
#ifdefWIN32
4748
else
4849
{
4950
elog(ERROR,"Pathman module must be initialized in postmaster. "
5051
"Put the following line to configuration file: "
5152
"shared_preload_libraries='pg_pathman'");
5253
initialization_needed= false;
5354
}
55+
#endif
5456
}
5557

5658
create_relations_hashtable();

‎contrib/pg_pathman/pg_pathman.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,16 @@ static void set_pathkeys(PlannerInfo *root, RelOptInfo *childrel, Path *path);
103103
void
104104
_PG_init(void)
105105
{
106+
#ifndefWIN32
107+
if (IsUnderPostmaster)
108+
{
109+
elog(ERROR,"Pathman module must be initialized in postmaster. "
110+
"Put the following line to configuration file: "
111+
"shared_preload_libraries='pg_pathman'");
112+
initialization_needed= false;
113+
}
114+
#endif
115+
106116
set_rel_pathlist_hook_original=set_rel_pathlist_hook;
107117
set_rel_pathlist_hook=pathman_set_rel_pathlist_hook;
108118
shmem_startup_hook_original=shmem_startup_hook;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp