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
ef5bea51
Commit
ef5bea51
authored
Jul 03, 2000
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move global internal files to PGDATA/global.
parent
e2d3932e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
30 deletions
+31
-30
src/backend/bootstrap/bootstrap.c
src/backend/bootstrap/bootstrap.c
+3
-5
src/backend/catalog/catalog.c
src/backend/catalog/catalog.c
+7
-7
src/backend/libpq/crypt.c
src/backend/libpq/crypt.c
+3
-3
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+4
-6
src/backend/utils/misc/database.c
src/backend/utils/misc/database.c
+3
-3
src/bin/initdb/initdb.sh
src/bin/initdb/initdb.sh
+11
-6
No files found.
src/backend/bootstrap/bootstrap.c
View file @
ef5bea51
...
...
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.8
8 2000/06/28 03:31:09 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.8
9 2000/07/03 20:48:27 petere
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -347,10 +347,8 @@ BootstrapMain(int argc, char *argv[])
*/
if
(
IsUnderPostmaster
||
xloginit
)
{
snprintf
(
XLogDir
,
MAXPGPATH
,
"%s%cpg_xlog"
,
DataDir
,
SEP_CHAR
);
snprintf
(
ControlFilePath
,
MAXPGPATH
,
"%s%cpg_control"
,
DataDir
,
SEP_CHAR
);
snprintf
(
XLogDir
,
MAXPGPATH
,
"%s/pg_xlog"
,
DataDir
);
snprintf
(
ControlFilePath
,
MAXPGPATH
,
"%s/global/pg_control"
,
DataDir
);
}
if
(
IsUnderPostmaster
&&
xloginit
)
...
...
src/backend/catalog/catalog.c
View file @
ef5bea51
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.3
2 2000/04/12 17:14:55 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.3
3 2000/07/03 20:48:28 petere
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -37,11 +37,11 @@ relpath(const char *relname)
if
(
IsSharedSystemRelationName
(
relname
))
{
/* Shared system relations live in
DataDir
*/
size_t
bufsize
=
strlen
(
DataDir
)
+
sizeof
(
NameData
)
+
2
;
/* Shared system relations live in
{datadir}/global
*/
size_t
bufsize
=
strlen
(
DataDir
)
+
8
+
sizeof
(
NameData
)
+
1
;
path
=
(
char
*
)
palloc
(
bufsize
);
snprintf
(
path
,
bufsize
,
"%s
%c%s"
,
DataDir
,
SEP_CHAR
,
relname
);
snprintf
(
path
,
bufsize
,
"%s
/global/%s"
,
DataDir
,
relname
);
return
path
;
}
...
...
@@ -71,9 +71,9 @@ relpath_blind(const char *dbname, const char *relname,
if
(
dbid
==
(
Oid
)
0
)
{
/* Shared system relations live in
DataDir
*/
path
=
(
char
*
)
palloc
(
strlen
(
DataDir
)
+
sizeof
(
NameData
)
+
2
);
sprintf
(
path
,
"%s
%c%s"
,
DataDir
,
SEP_CHAR
,
relname
);
/* Shared system relations live in
{datadir}/global
*/
path
=
(
char
*
)
palloc
(
strlen
(
DataDir
)
+
8
+
sizeof
(
NameData
)
+
1
);
sprintf
(
path
,
"%s
/global/%s"
,
DataDir
,
relname
);
}
else
if
(
dbid
==
MyDatabaseId
)
{
...
...
src/backend/libpq/crypt.c
View file @
ef5bea51
...
...
@@ -9,7 +9,7 @@
* Dec 17, 1997 - Todd A. Brandys
* Orignal Version Completed.
*
* $Id: crypt.c,v 1.2
5 2000/06/09 01:11:06 tgl
Exp $
* $Id: crypt.c,v 1.2
6 2000/07/03 20:48:30 petere
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -38,9 +38,9 @@ crypt_getpwdfilename()
static
char
*
pfnam
=
NULL
;
int
bufsize
;
bufsize
=
strlen
(
DataDir
)
+
strlen
(
CRYPT_PWD_FILE
)
+
2
;
bufsize
=
strlen
(
DataDir
)
+
8
+
strlen
(
CRYPT_PWD_FILE
)
+
1
;
pfnam
=
(
char
*
)
palloc
(
bufsize
);
snprintf
(
pfnam
,
bufsize
,
"%s/%s"
,
DataDir
,
CRYPT_PWD_FILE
);
snprintf
(
pfnam
,
bufsize
,
"%s/
global/
%s"
,
DataDir
,
CRYPT_PWD_FILE
);
return
pfnam
;
}
...
...
src/backend/tcop/postgres.c
View file @
ef5bea51
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.16
4 2000/07/03 20:46:00
petere Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.16
5 2000/07/03 20:48:37
petere Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
...
...
@@ -1294,10 +1294,8 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
on_proc_exit
(
UnlinkPidFile
,
NULL
);
BaseInit
();
snprintf
(
XLogDir
,
MAXPGPATH
,
"%s%cpg_xlog"
,
DataDir
,
SEP_CHAR
);
snprintf
(
ControlFilePath
,
MAXPGPATH
,
"%s%cpg_control"
,
DataDir
,
SEP_CHAR
);
snprintf
(
XLogDir
,
MAXPGPATH
,
"%s/pg_xlog"
,
DataDir
);
snprintf
(
ControlFilePath
,
MAXPGPATH
,
"%s/global/pg_control"
,
DataDir
);
StartupXLOG
();
}
...
...
@@ -1406,7 +1404,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
if
(
!
IsUnderPostmaster
)
{
puts
(
"
\n
POSTGRES backend interactive interface "
);
puts
(
"$Revision: 1.16
4 $ $Date: 2000/07/03 20:46:00
$
\n
"
);
puts
(
"$Revision: 1.16
5 $ $Date: 2000/07/03 20:48:37
$
\n
"
);
}
/*
...
...
src/backend/utils/misc/database.c
View file @
ef5bea51
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.3
8 2000/06/02 15:57:34 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.3
9 2000/07/03 20:48:42 petere
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -143,8 +143,8 @@ GetRawDatabaseInfo(const char *name, Oid *db_id, char *path)
char
*
dbfname
;
Form_pg_database
tup_db
;
dbfname
=
(
char
*
)
palloc
(
strlen
(
DataDir
)
+
strlen
(
DatabaseRelationName
)
+
2
);
sprintf
(
dbfname
,
"%s
%c%s"
,
DataDir
,
SEP_CHAR
,
DatabaseRelationName
);
dbfname
=
(
char
*
)
palloc
(
strlen
(
DataDir
)
+
8
+
strlen
(
DatabaseRelationName
)
+
2
);
sprintf
(
dbfname
,
"%s
/global/%s"
,
DataDir
,
DatabaseRelationName
);
if
((
dbfd
=
open
(
dbfname
,
O_RDONLY
|
PG_BINARY
,
0
))
<
0
)
elog
(
FATAL
,
"cannot open %s: %s"
,
dbfname
,
strerror
(
errno
));
...
...
src/bin/initdb/initdb.sh
View file @
ef5bea51
...
...
@@ -26,7 +26,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.9
8 2000/07/02 15:21:00
petere Exp $
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.9
9 2000/07/03 20:48:46
petere Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -406,21 +406,26 @@ then
else
if
[
!
-d
"
$PGDATA
"
]
then
echo
"Creating d
atabase system d
irectory
$PGDATA
"
echo
"Creating directory
$PGDATA
"
mkdir
"
$PGDATA
"
||
exit_nicely
else
echo
"Fixing permissions on
pre-existing data
directory
$PGDATA
"
echo
"Fixing permissions on
existing
directory
$PGDATA
"
chmod
go-rwx
"
$PGDATA
"
||
exit_nicely
fi
if
[
!
-d
"
$PGDATA
"
/base
]
then
echo
"Creating d
atabase system d
irectory
$PGDATA
/base"
echo
"Creating directory
$PGDATA
/base"
mkdir
"
$PGDATA
"
/base
||
exit_nicely
fi
if
[
!
-d
"
$PGDATA
"
/global
]
then
echo
"Creating directory
$PGDATA
/global"
mkdir
"
$PGDATA
"
/global
||
exit_nicely
fi
if
[
!
-d
"
$PGDATA
"
/pg_xlog
]
then
echo
"Creating d
atabase XLOG d
irectory
$PGDATA
/pg_xlog"
echo
"Creating directory
$PGDATA
/pg_xlog"
mkdir
"
$PGDATA
"
/pg_xlog
||
exit_nicely
fi
fi
...
...
@@ -458,7 +463,7 @@ echo $short_version > "$PGDATA"/base/template1/PG_VERSION || exit_nicely
if
[
"
$template_only
"
-eq
0
]
then
echo
"Creating global relations in
$PGDATA
/
base
"
echo
"Creating global relations in
$PGDATA
/
global
"
[
"
$debug
"
-ne
0
]
&&
echo
"Running:
$PGPATH
/postgres
$BACKENDARGS
template1"
cat
"
$GLOBAL
"
\
...
...
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