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

Commit483b7f8

Browse files
committed
Rename pg_tablespaces directory to pg_tblspc, so it is more unique from
the pg_tablespace table. Update catalog version.
1 parentac334e9 commit483b7f8

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

‎src/backend/catalog/catalog.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/catalog/catalog.c,v 1.52 2004/06/18 06:13:19 tgl Exp $
12+
* $PostgreSQL: pgsql/src/backend/catalog/catalog.c,v 1.53 2004/06/21 01:04:41 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -60,7 +60,7 @@ relpath(RelFileNode rnode)
6060
/* All other tablespaces are accessed via symlinks */
6161
pathlen=strlen(DataDir)+16+OIDCHARS+1+OIDCHARS+1+OIDCHARS+1;
6262
path= (char*)palloc(pathlen);
63-
snprintf(path,pathlen,"%s/pg_tablespaces/%u/%u/%u",
63+
snprintf(path,pathlen,"%s/pg_tblspc/%u/%u/%u",
6464
DataDir,rnode.spcNode,rnode.dbNode,rnode.relNode);
6565
}
6666
returnpath;
@@ -101,7 +101,7 @@ GetDatabasePath(Oid dbNode, Oid spcNode)
101101
/* All other tablespaces are accessed via symlinks */
102102
pathlen=strlen(DataDir)+16+OIDCHARS+1+OIDCHARS+1;
103103
path= (char*)palloc(pathlen);
104-
snprintf(path,pathlen,"%s/pg_tablespaces/%u/%u",
104+
snprintf(path,pathlen,"%s/pg_tblspc/%u/%u",
105105
DataDir,spcNode,dbNode);
106106
}
107107
returnpath;

‎src/backend/commands/tablespace.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
* files within a tablespace into database-specific subdirectories.
1515
*
1616
* To support file access via the information given in RelFileNode, we
17-
* maintain a symbolic-link map in $PGDATA/pg_tablespaces. The symlinks are
17+
* maintain a symbolic-link map in $PGDATA/pg_tblspc. The symlinks are
1818
* named by tablespace OIDs and point to the actual tablespace directories.
1919
* Thus the full path to an arbitrary file is
20-
*$PGDATA/pg_tablespaces/spcoid/dboid/relfilenode
20+
*$PGDATA/pg_tblspc/spcoid/dboid/relfilenode
2121
*
2222
* There are two tablespaces created at initdb time: global (for shared
2323
* tables) and default (for everything else). For backwards compatibility
@@ -45,7 +45,7 @@
4545
*
4646
*
4747
* IDENTIFICATION
48-
* $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.1 2004/06/18 06:13:23 tgl Exp $
48+
* $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.2 2004/06/21 01:04:42 momjian Exp $
4949
*
5050
*-------------------------------------------------------------------------
5151
*/
@@ -305,7 +305,7 @@ CreateTableSpace(CreateTableSpaceStmt *stmt)
305305
* All seems well, create the symlink
306306
*/
307307
linkloc= (char*)palloc(strlen(DataDir)+16+10+1);
308-
sprintf(linkloc,"%s/pg_tablespaces/%u",DataDir,tablespaceoid);
308+
sprintf(linkloc,"%s/pg_tblspc/%u",DataDir,tablespaceoid);
309309

310310
if (symlink(location,linkloc)<0)
311311
ereport(ERROR,
@@ -385,7 +385,7 @@ DropTableSpace(DropTableSpaceStmt *stmt)
385385
tablespacename);
386386

387387
location= (char*)palloc(strlen(DataDir)+16+10+1);
388-
sprintf(location,"%s/pg_tablespaces/%u",DataDir,tablespaceoid);
388+
sprintf(location,"%s/pg_tblspc/%u",DataDir,tablespaceoid);
389389

390390
/*
391391
* Check if the tablespace still contains any files. We try to rmdir

‎src/bin/initdb/initdb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* Portions Copyright (c) 1994, Regents of the University of California
4040
* Portions taken from FreeBSD.
4141
*
42-
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.38 2004/06/18 06:13:58 tgl Exp $
42+
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.39 2004/06/21 01:04:44 momjian Exp $
4343
*
4444
*-------------------------------------------------------------------------
4545
*/
@@ -1785,7 +1785,7 @@ main(int argc, char *argv[])
17851785
char*pgdenv;/* PGDATA value got from sent to
17861786
* environment */
17871787
char*subdirs[]=
1788-
{"global","pg_xlog","pg_clog","base","base/1","pg_tablespaces"};
1788+
{"global","pg_xlog","pg_clog","base","base/1","pg_tblspc"};
17891789

17901790
progname=get_progname(argv[0]);
17911791
set_pglocale_pgservice(argv[0],"initdb");

‎src/include/catalog/catversion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
3838
* Portions Copyright (c) 1994, Regents of the University of California
3939
*
40-
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.237 2004/06/18 06:14:05 tgl Exp $
40+
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.238 2004/06/21 01:04:45 momjian Exp $
4141
*
4242
*-------------------------------------------------------------------------
4343
*/
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO200406171
56+
#defineCATALOG_VERSION_NO200406201
5757

5858
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp