Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
fbfed127
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
fbfed127
编写于
1月 16, 2019
作者:
H
Hubert Zhang
提交者:
GitHub
1月 16, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "Add hook functions for diskquota extension."
This reverts commit
b95059a8
.
上级
0d38763c
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
0 addition
and
85 deletion
+0
-85
src/backend/cdb/cdbbufferedappend.c
src/backend/cdb/cdbbufferedappend.c
+0
-7
src/backend/cdb/dispatcher/cdbdisp_async.c
src/backend/cdb/dispatcher/cdbdisp_async.c
+0
-8
src/backend/storage/smgr/smgr.c
src/backend/storage/smgr/smgr.c
+0
-30
src/include/cdb/cdbbufferedappend.h
src/include/cdb/cdbbufferedappend.h
+0
-4
src/include/cdb/cdbdisp_async.h
src/include/cdb/cdbdisp_async.h
+0
-8
src/include/storage/smgr.h
src/include/storage/smgr.h
+0
-28
未找到文件。
src/backend/cdb/cdbbufferedappend.c
浏览文件 @
fbfed127
...
@@ -23,11 +23,6 @@
...
@@ -23,11 +23,6 @@
#include "cdb/cdbbufferedappend.h"
#include "cdb/cdbbufferedappend.h"
#include "utils/guc.h"
#include "utils/guc.h"
/*
* Hook function in BufferedAppendWrite, used by plugins to call
* when the size of AO table is increased.
*/
BufferedAppendWrite_hook_type
BufferedAppendWrite_hook
=
NULL
;
static
void
BufferedAppendWrite
(
static
void
BufferedAppendWrite
(
BufferedAppend
*
bufferedAppend
,
BufferedAppend
*
bufferedAppend
,
bool
needsWAL
);
bool
needsWAL
);
...
@@ -201,8 +196,6 @@ BufferedAppendWrite(BufferedAppend *bufferedAppend, bool needsWAL)
...
@@ -201,8 +196,6 @@ BufferedAppendWrite(BufferedAppend *bufferedAppend, bool needsWAL)
bufferedAppend
->
filePathName
,
bufferedAppend
->
filePathName
,
bufferedAppend
->
largeWritePosition
,
bufferedAppend
->
largeWritePosition
,
bytestotal
);
bytestotal
);
if
(
BufferedAppendWrite_hook
)
(
*
BufferedAppendWrite_hook
)(
bufferedAppend
);
/*
/*
* Log each varblock to the XLog. Write to the file first, before
* Log each varblock to the XLog. Write to the file first, before
...
...
src/backend/cdb/dispatcher/cdbdisp_async.c
浏览文件 @
fbfed127
...
@@ -48,8 +48,6 @@
...
@@ -48,8 +48,6 @@
*/
*/
#define DISPATCH_WAIT_CANCEL_TIMEOUT_MSEC 100
#define DISPATCH_WAIT_CANCEL_TIMEOUT_MSEC 100
DispatcherCheckPerms_hook_type
DispatcherCheckPerms_hook
=
NULL
;
typedef
struct
CdbDispatchCmdAsync
typedef
struct
CdbDispatchCmdAsync
{
{
...
@@ -541,12 +539,6 @@ checkDispatchResult(CdbDispatcherState *ds,
...
@@ -541,12 +539,6 @@ checkDispatchResult(CdbDispatcherState *ds,
checkSegmentAlive
(
pParms
);
checkSegmentAlive
(
pParms
);
}
}
/* Hook to check permissions when dispatcher timeout */
if
(
DispatcherCheckPerms_hook
&&
pParms
->
waitMode
==
DISPATCH_WAIT_NONE
)
{
(
*
DispatcherCheckPerms_hook
)();
}
if
(
!
wait
)
if
(
!
wait
)
break
;
break
;
}
}
...
...
src/backend/storage/smgr/smgr.c
浏览文件 @
fbfed127
...
@@ -32,16 +32,6 @@
...
@@ -32,16 +32,6 @@
#include "utils/hsearch.h"
#include "utils/hsearch.h"
#include "utils/inval.h"
#include "utils/inval.h"
/*
* Hook for plugins to extend smgr functions.
* for example, collect statistics from smgr functions
* via recording the active relfilenode information.
*/
smgrcreate_hook_type
smgrcreate_hook
=
NULL
;
smgrextend_hook_type
smgrextend_hook
=
NULL
;
smgrtruncate_hook_type
smgrtruncate_hook
=
NULL
;
smgrdounlinkall_hook_type
smgrdounlinkall_hook
=
NULL
;
/*
/*
* Each backend has a hashtable that stores all extant SMgrRelation objects.
* Each backend has a hashtable that stores all extant SMgrRelation objects.
* In addition, "unowned" SMgrRelation objects are chained together in a list.
* In addition, "unowned" SMgrRelation objects are chained together in a list.
...
@@ -339,11 +329,6 @@ smgrcreate(SMgrRelation reln, ForkNumber forknum, bool isRedo)
...
@@ -339,11 +329,6 @@ smgrcreate(SMgrRelation reln, ForkNumber forknum, bool isRedo)
if
(
isRedo
&&
reln
->
md_fd
[
forknum
]
!=
NULL
)
if
(
isRedo
&&
reln
->
md_fd
[
forknum
]
!=
NULL
)
return
;
return
;
if
(
smgrcreate_hook
)
{
(
*
smgrcreate_hook
)(
reln
,
forknum
,
isRedo
);
}
/*
/*
* We may be using the target table space for the first time in this
* We may be using the target table space for the first time in this
* database, so create a per-database subdirectory if needed.
* database, so create a per-database subdirectory if needed.
...
@@ -460,11 +445,6 @@ smgrdounlinkall(SMgrRelation *rels, int nrels, bool isRedo, char *relstorages)
...
@@ -460,11 +445,6 @@ smgrdounlinkall(SMgrRelation *rels, int nrels, bool isRedo, char *relstorages)
if
(
nrels
==
0
)
if
(
nrels
==
0
)
return
;
return
;
if
(
smgrdounlinkall_hook
)
{
(
*
smgrdounlinkall_hook
)(
rels
,
nrels
,
isRedo
,
relstorages
);
}
/*
/*
* create an array which contains all relations to be dropped, and close
* create an array which contains all relations to be dropped, and close
* each relation's forks at the smgr level while at it
* each relation's forks at the smgr level while at it
...
@@ -539,11 +519,6 @@ void
...
@@ -539,11 +519,6 @@ void
smgrextend
(
SMgrRelation
reln
,
ForkNumber
forknum
,
BlockNumber
blocknum
,
smgrextend
(
SMgrRelation
reln
,
ForkNumber
forknum
,
BlockNumber
blocknum
,
char
*
buffer
,
bool
skipFsync
)
char
*
buffer
,
bool
skipFsync
)
{
{
if
(
smgrextend_hook
)
{
(
*
smgrextend_hook
)(
reln
,
forknum
,
blocknum
,
buffer
,
skipFsync
);
}
mdextend
(
reln
,
forknum
,
blocknum
,
buffer
,
skipFsync
);
mdextend
(
reln
,
forknum
,
blocknum
,
buffer
,
skipFsync
);
}
}
...
@@ -612,11 +587,6 @@ smgrnblocks(SMgrRelation reln, ForkNumber forknum)
...
@@ -612,11 +587,6 @@ smgrnblocks(SMgrRelation reln, ForkNumber forknum)
void
void
smgrtruncate
(
SMgrRelation
reln
,
ForkNumber
forknum
,
BlockNumber
nblocks
)
smgrtruncate
(
SMgrRelation
reln
,
ForkNumber
forknum
,
BlockNumber
nblocks
)
{
{
if
(
smgrtruncate_hook
)
{
(
*
smgrtruncate_hook
)(
reln
,
forknum
,
nblocks
);
}
/*
/*
* Get rid of any buffers for the about-to-be-deleted blocks. bufmgr will
* Get rid of any buffers for the about-to-be-deleted blocks. bufmgr will
* just drop them without bothering to write the contents.
* just drop them without bothering to write the contents.
...
...
src/include/cdb/cdbbufferedappend.h
浏览文件 @
fbfed127
...
@@ -182,8 +182,4 @@ extern void BufferedAppendCompleteFile(
...
@@ -182,8 +182,4 @@ extern void BufferedAppendCompleteFile(
extern
void
BufferedAppendFinish
(
extern
void
BufferedAppendFinish
(
BufferedAppend
*
bufferedAppend
);
BufferedAppend
*
bufferedAppend
);
/* Hook type and declaration in BufferedAppendWrite */
typedef
void
(
*
BufferedAppendWrite_hook_type
)(
BufferedAppend
*
bufferedAppend
);
extern
PGDLLIMPORT
BufferedAppendWrite_hook_type
BufferedAppendWrite_hook
;
#endif
/* CDBBUFFEREDAPPEND_H */
#endif
/* CDBBUFFEREDAPPEND_H */
src/include/cdb/cdbdisp_async.h
浏览文件 @
fbfed127
...
@@ -18,12 +18,4 @@
...
@@ -18,12 +18,4 @@
extern
DispatcherInternalFuncs
DispatcherAsyncFuncs
;
extern
DispatcherInternalFuncs
DispatcherAsyncFuncs
;
/*
* Hook for plugins to check permissions in dispatcher
* One example is to check whether disk quota limit is
* exceeded for the table which is loading data.
*/
typedef
bool
(
*
DispatcherCheckPerms_hook_type
)
(
void
);
extern
PGDLLIMPORT
DispatcherCheckPerms_hook_type
DispatcherCheckPerms_hook
;
#endif
#endif
src/include/storage/smgr.h
浏览文件 @
fbfed127
...
@@ -146,32 +146,4 @@ extern Datum smgrin(PG_FUNCTION_ARGS);
...
@@ -146,32 +146,4 @@ extern Datum smgrin(PG_FUNCTION_ARGS);
extern
Datum
smgreq
(
PG_FUNCTION_ARGS
);
extern
Datum
smgreq
(
PG_FUNCTION_ARGS
);
extern
Datum
smgrne
(
PG_FUNCTION_ARGS
);
extern
Datum
smgrne
(
PG_FUNCTION_ARGS
);
/*
* Hook for plugins to extend smgr functions.
* for example, collect statistics from smgr functions
* via recording the active relfilenode information.
*/
typedef
void
(
*
smgrcreate_hook_type
)(
SMgrRelation
reln
,
ForkNumber
forknum
,
bool
isRedo
);
extern
PGDLLIMPORT
smgrcreate_hook_type
smgrcreate_hook
;
typedef
void
(
*
smgrextend_hook_type
)(
SMgrRelation
reln
,
ForkNumber
forknum
,
BlockNumber
blocknum
,
char
*
buffer
,
bool
skipFsync
);
extern
PGDLLIMPORT
smgrextend_hook_type
smgrextend_hook
;
typedef
void
(
*
smgrtruncate_hook_type
)(
SMgrRelation
reln
,
ForkNumber
forknum
,
BlockNumber
nblocks
);
extern
PGDLLIMPORT
smgrtruncate_hook_type
smgrtruncate_hook
;
typedef
void
(
*
smgrdounlinkall_hook_type
)(
SMgrRelation
*
rels
,
int
nrels
,
bool
isRedo
,
char
*
relstorages
);
extern
PGDLLIMPORT
smgrdounlinkall_hook_type
smgrdounlinkall_hook
;
#endif
/* SMGR_H */
#endif
/* SMGR_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录