Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
483b7f82
Commit
483b7f82
authored
Jun 21, 2004
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename pg_tablespaces directory to pg_tblspc, so it is more unique from
the pg_tablespace table. Update catalog version.
parent
ac334e95
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
src/backend/catalog/catalog.c
src/backend/catalog/catalog.c
+3
-3
src/backend/commands/tablespace.c
src/backend/commands/tablespace.c
+5
-5
src/bin/initdb/initdb.c
src/bin/initdb/initdb.c
+2
-2
src/include/catalog/catversion.h
src/include/catalog/catversion.h
+2
-2
No files found.
src/backend/catalog/catalog.c
View file @
483b7f82
...
...
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/catalog/catalog.c,v 1.5
2 2004/06/18 06:13:19 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/catalog/catalog.c,v 1.5
3 2004/06/21 01:04:41 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -60,7 +60,7 @@ relpath(RelFileNode rnode)
/* All other tablespaces are accessed via symlinks */
pathlen
=
strlen
(
DataDir
)
+
16
+
OIDCHARS
+
1
+
OIDCHARS
+
1
+
OIDCHARS
+
1
;
path
=
(
char
*
)
palloc
(
pathlen
);
snprintf
(
path
,
pathlen
,
"%s/pg_t
ablespaces
/%u/%u/%u"
,
snprintf
(
path
,
pathlen
,
"%s/pg_t
blspc
/%u/%u/%u"
,
DataDir
,
rnode
.
spcNode
,
rnode
.
dbNode
,
rnode
.
relNode
);
}
return
path
;
...
...
@@ -101,7 +101,7 @@ GetDatabasePath(Oid dbNode, Oid spcNode)
/* All other tablespaces are accessed via symlinks */
pathlen
=
strlen
(
DataDir
)
+
16
+
OIDCHARS
+
1
+
OIDCHARS
+
1
;
path
=
(
char
*
)
palloc
(
pathlen
);
snprintf
(
path
,
pathlen
,
"%s/pg_t
ablespaces
/%u/%u"
,
snprintf
(
path
,
pathlen
,
"%s/pg_t
blspc
/%u/%u"
,
DataDir
,
spcNode
,
dbNode
);
}
return
path
;
...
...
src/backend/commands/tablespace.c
View file @
483b7f82
...
...
@@ -14,10 +14,10 @@
* files within a tablespace into database-specific subdirectories.
*
* To support file access via the information given in RelFileNode, we
* maintain a symbolic-link map in $PGDATA/pg_t
ablespaces
. The symlinks are
* maintain a symbolic-link map in $PGDATA/pg_t
blspc
. The symlinks are
* named by tablespace OIDs and point to the actual tablespace directories.
* Thus the full path to an arbitrary file is
* $PGDATA/pg_t
ablespaces
/spcoid/dboid/relfilenode
* $PGDATA/pg_t
blspc
/spcoid/dboid/relfilenode
*
* There are two tablespaces created at initdb time: global (for shared
* tables) and default (for everything else). For backwards compatibility
...
...
@@ -45,7 +45,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.
1 2004/06/18 06:13:23 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.
2 2004/06/21 01:04:42 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -305,7 +305,7 @@ CreateTableSpace(CreateTableSpaceStmt *stmt)
* All seems well, create the symlink
*/
linkloc
=
(
char
*
)
palloc
(
strlen
(
DataDir
)
+
16
+
10
+
1
);
sprintf
(
linkloc
,
"%s/pg_t
ablespaces
/%u"
,
DataDir
,
tablespaceoid
);
sprintf
(
linkloc
,
"%s/pg_t
blspc
/%u"
,
DataDir
,
tablespaceoid
);
if
(
symlink
(
location
,
linkloc
)
<
0
)
ereport
(
ERROR
,
...
...
@@ -385,7 +385,7 @@ DropTableSpace(DropTableSpaceStmt *stmt)
tablespacename
);
location
=
(
char
*
)
palloc
(
strlen
(
DataDir
)
+
16
+
10
+
1
);
sprintf
(
location
,
"%s/pg_t
ablespaces
/%u"
,
DataDir
,
tablespaceoid
);
sprintf
(
location
,
"%s/pg_t
blspc
/%u"
,
DataDir
,
tablespaceoid
);
/*
* Check if the tablespace still contains any files. We try to rmdir
...
...
src/bin/initdb/initdb.c
View file @
483b7f82
...
...
@@ -39,7 +39,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions taken from FreeBSD.
*
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.3
8 2004/06/18 06:13:58 tgl
Exp $
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.3
9 2004/06/21 01:04:44 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1785,7 +1785,7 @@ main(int argc, char *argv[])
char
*
pgdenv
;
/* PGDATA value got from sent to
* environment */
char
*
subdirs
[]
=
{
"global"
,
"pg_xlog"
,
"pg_clog"
,
"base"
,
"base/1"
,
"pg_t
ablespaces
"
};
{
"global"
,
"pg_xlog"
,
"pg_clog"
,
"base"
,
"base/1"
,
"pg_t
blspc
"
};
progname
=
get_progname
(
argv
[
0
]);
set_pglocale_pgservice
(
argv
[
0
],
"initdb"
);
...
...
src/include/catalog/catversion.h
View file @
483b7f82
...
...
@@ -37,7 +37,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.23
7 2004/06/18 06:14:05 tgl
Exp $
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.23
8 2004/06/21 01:04:45 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -53,6 +53,6 @@
*/
/* yyyymmddN */
#define CATALOG_VERSION_NO 200406
17
1
#define CATALOG_VERSION_NO 200406
20
1
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment