Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
25d1ed04
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,发现更多精彩内容 >>
提交
25d1ed04
编写于
12月 03, 2012
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert initdb --sync-only patch that had incorrect commit messages.
上级
4d88bc8f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
5 addition
and
47 deletion
+5
-47
contrib/pg_upgrade/pg_upgrade.c
contrib/pg_upgrade/pg_upgrade.c
+0
-6
contrib/pg_upgrade/server.c
contrib/pg_upgrade/server.c
+4
-6
doc/src/sgml/config.sgml
doc/src/sgml/config.sgml
+0
-9
doc/src/sgml/ref/initdb.sgml
doc/src/sgml/ref/initdb.sgml
+0
-11
src/bin/initdb/initdb.c
src/bin/initdb/initdb.c
+1
-15
未找到文件。
contrib/pg_upgrade/pg_upgrade.c
浏览文件 @
25d1ed04
...
...
@@ -150,12 +150,6 @@ main(int argc, char **argv)
new_cluster
.
pgdata
);
check_ok
();
prep_status
(
"Sync data directory to disk"
);
exec_prog
(
UTILITY_LOG_FILE
,
NULL
,
true
,
"
\"
%s/initdb
\"
--sync-only
\"
%s
\"
"
,
new_cluster
.
bindir
,
new_cluster
.
pgdata
);
check_ok
();
create_script_for_cluster_analyze
(
&
analyze_script_file_name
);
create_script_for_old_cluster_deletion
(
&
deletion_script_file_name
);
...
...
contrib/pg_upgrade/server.c
浏览文件 @
25d1ed04
...
...
@@ -209,10 +209,9 @@ start_postmaster(ClusterInfo *cluster)
* a gap of 2000000000 from the current xid counter, so autovacuum will
* not touch them.
*
* Turn off durability requirements to improve object creation speed, and
* we only modify the new cluster, so only use it there. If there is a
* crash, the new cluster has to be recreated anyway. fsync=off is a big
* win on ext4.
* synchronous_commit=off improves object creation speed, and we only
* modify the new cluster, so only use it there. If there is a crash,
* the new cluster has to be recreated anyway.
*/
snprintf
(
cmd
,
sizeof
(
cmd
),
"
\"
%s/pg_ctl
\"
-w -l
\"
%s
\"
-D
\"
%s
\"
-o
\"
-p %d%s%s%s%s
\"
start"
,
...
...
@@ -220,8 +219,7 @@ start_postmaster(ClusterInfo *cluster)
(
cluster
->
controldata
.
cat_ver
>=
BINARY_UPGRADE_SERVER_FLAG_CAT_VER
)
?
" -b"
:
" -c autovacuum=off -c autovacuum_freeze_max_age=2000000000"
,
(
cluster
==
&
new_cluster
)
?
" -c synchronous_commit=off -c fsync=off -c full_page_writes=off"
:
""
,
(
cluster
==
&
new_cluster
)
?
" -c synchronous_commit=off"
:
""
,
cluster
->
pgopts
?
cluster
->
pgopts
:
""
,
socket_string
);
/*
...
...
doc/src/sgml/config.sgml
浏览文件 @
25d1ed04
...
...
@@ -1696,15 +1696,6 @@ include 'filename'
turning off <varname>fsync</varname>.
</para>
<para>
For reliable recovery when changing <varname>fsync</varname>
off to on, it is necessary to force all modified buffers in the
kernel to durable storage. This can be done while the cluster
is shutdown or while fsync is on by running <command>initdb
--sync-only</command>, running <command>sync</>, unmounting the
file system, or rebooting the server.
</para>
<para>
In many situations, turning off <xref linkend="guc-synchronous-commit">
for noncritical transactions can provide much of the potential
...
...
doc/src/sgml/ref/initdb.sgml
浏览文件 @
25d1ed04
...
...
@@ -244,17 +244,6 @@ PostgreSQL documentation
</listitem>
</varlistentry>
<varlistentry>
<term><option>-S</option></term>
<term><option>--sync-only</option></term>
<listitem>
<para>
Safely write all database files to disk and exit. This does not
perform any of the normal <application>initdb</> operations.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-T <replaceable>CFG</></option></term>
<term><option>--text-search-config=<replaceable>CFG</></option></term>
...
...
src/bin/initdb/initdb.c
浏览文件 @
25d1ed04
...
...
@@ -118,7 +118,6 @@ static const char *authmethodlocal = "";
static
bool
debug
=
false
;
static
bool
noclean
=
false
;
static
bool
do_sync
=
true
;
static
bool
sync_only
=
false
;
static
bool
show_setting
=
false
;
static
char
*
xlog_dir
=
""
;
...
...
@@ -2797,7 +2796,6 @@ usage(const char *progname)
printf
(
_
(
" -n, --noclean do not clean up after errors
\n
"
));
printf
(
_
(
" -N, --nosync do not wait for changes to be written safely to disk
\n
"
));
printf
(
_
(
" -s, --show show internal settings
\n
"
));
printf
(
_
(
" -S, --sync-only only sync data directory
\n
"
));
printf
(
_
(
"
\n
Other options:
\n
"
));
printf
(
_
(
" -V, --version output version information, then exit
\n
"
));
printf
(
_
(
" -?, --help show this help, then exit
\n
"
));
...
...
@@ -3447,7 +3445,6 @@ main(int argc, char *argv[])
{
"show"
,
no_argument
,
NULL
,
's'
},
{
"noclean"
,
no_argument
,
NULL
,
'n'
},
{
"nosync"
,
no_argument
,
NULL
,
'N'
},
{
"sync-only"
,
no_argument
,
NULL
,
'S'
},
{
"xlogdir"
,
required_argument
,
NULL
,
'X'
},
{
NULL
,
0
,
NULL
,
0
}
};
...
...
@@ -3479,7 +3476,7 @@ main(int argc, char *argv[])
/* process command-line options */
while
((
c
=
getopt_long
(
argc
,
argv
,
"dD:E:L:nNU:WA:s
S
T:X:"
,
long_options
,
&
option_index
))
!=
-
1
)
while
((
c
=
getopt_long
(
argc
,
argv
,
"dD:E:L:nNU:WA:sT:X:"
,
long_options
,
&
option_index
))
!=
-
1
)
{
switch
(
c
)
{
...
...
@@ -3525,9 +3522,6 @@ main(int argc, char *argv[])
case
'N'
:
do_sync
=
false
;
break
;
case
'S'
:
sync_only
=
true
;
break
;
case
'L'
:
share_path
=
pg_strdup
(
optarg
);
break
;
...
...
@@ -3595,14 +3589,6 @@ main(int argc, char *argv[])
exit
(
1
);
}
/* If we only need to fsync, just to it and exit */
if
(
sync_only
)
{
setup_pgdata
();
perform_fsync
();
return
0
;
}
if
(
pwprompt
&&
pwfilename
)
{
fprintf
(
stderr
,
_
(
"%s: password prompt and password file cannot be specified together
\n
"
),
progname
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录