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

Commitc282b36

Browse files
committed
More tablespace.c comment improvements.
1 parent85fcbd8 commitc282b36

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

‎src/backend/commands/tablespace.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.69 2010/01/07 04:05:39 momjian Exp $
40+
* $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.70 2010/01/07 04:10:39 momjian Exp $
4141
*
4242
*-------------------------------------------------------------------------
4343
*/
@@ -99,9 +99,8 @@ static void write_version_file(const char *path);
9999
* symlink would normally be. This isn't an exact replay of course, but
100100
* it's the best we can do given the available information.
101101
*
102-
* If tablespaces are not supported, you might think this could be a no-op,
103-
* but you'd be wrong: we still need it in case we have to re-create a
104-
* database subdirectory (of $PGDATA/base) during WAL replay.
102+
* If tablespaces are not supported, we still need it in case we have to
103+
* re-create a database subdirectory (of $PGDATA/base) during WAL replay.
105104
*/
106105
void
107106
TablespaceCreateDbspace(OidspcNode,OiddbNode,boolisRedo)
@@ -123,6 +122,7 @@ TablespaceCreateDbspace(Oid spcNode, Oid dbNode, bool isRedo)
123122

124123
if (stat(dir,&st)<0)
125124
{
125+
/* Directory does not exist? */
126126
if (errno==ENOENT)
127127
{
128128
/*
@@ -137,7 +137,7 @@ TablespaceCreateDbspace(Oid spcNode, Oid dbNode, bool isRedo)
137137
*/
138138
if (stat(dir,&st)==0&&S_ISDIR(st.st_mode))
139139
{
140-
/* Directory was created. */
140+
/* Directory was created */
141141
}
142142
else
143143
{
@@ -152,6 +152,7 @@ TablespaceCreateDbspace(Oid spcNode, Oid dbNode, bool isRedo)
152152
(errcode_for_file_access(),
153153
errmsg("could not create directory \"%s\": %m",
154154
dir)));
155+
155156
/* Parent directory must be missing */
156157
parentdir=pstrdup(dir);
157158
get_parent_directory(parentdir);
@@ -162,6 +163,7 @@ TablespaceCreateDbspace(Oid spcNode, Oid dbNode, bool isRedo)
162163
errmsg("could not create directory \"%s\": %m",
163164
parentdir)));
164165
pfree(parentdir);
166+
165167
/* Create database directory */
166168
if (mkdir(dir,S_IRWXU)<0)
167169
ereport(ERROR,
@@ -252,7 +254,7 @@ CreateTableSpace(CreateTableSpaceStmt *stmt)
252254
* '/<dboid>/<relid>.<nnn>' (XXX but do we ever form the whole path
253255
* explicitly?This may be overly conservative.)
254256
*/
255-
if (strlen(location) >=(MAXPGPATH-1-OIDCHARS-1-OIDCHARS-1-OIDCHARS))
257+
if (strlen(location) >=MAXPGPATH-1-OIDCHARS-1-OIDCHARS-1-OIDCHARS)
256258
ereport(ERROR,
257259
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
258260
errmsg("tablespace location \"%s\" is too long",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp