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
0b5d194a
Commit
0b5d194a
authored
Jan 14, 2001
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor coding cleanups.
parent
a904181a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
15 deletions
+10
-15
src/backend/utils/init/postinit.c
src/backend/utils/init/postinit.c
+10
-15
No files found.
src/backend/utils/init/postinit.c
View file @
0b5d194a
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.7
7 2001/01/12 21:54:00
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.7
8 2001/01/14 22:21:54
tgl Exp $
*
*
*-------------------------------------------------------------------------
...
...
@@ -219,23 +219,17 @@ InitPostgres(const char *dbname, const char *username)
/* Verify if DataDir is ok */
if
(
access
(
DataDir
,
F_OK
)
==
-
1
)
elog
(
FATAL
,
"Database system not found. Data directory '%s' does not exist."
,
elog
(
FATAL
,
"Database system not found.
\n\t
"
"Data directory '%s' does not exist."
,
DataDir
);
ValidatePgVersion
(
DataDir
);
/*-----------------
* Find oid and path of the database we're about to open. Since we're
* not yet up and running we have to use the hackish GetRawDatabaseInfo.
*
* OLD COMMENTS:
* The database's oid forms half of the unique key for the system
* caches and lock tables. We therefore want it initialized before
* we open any relations, since opening relations puts things in the
* cache. To get around this problem, this code opens and scans the
* pg_database relation by hand.
/*
* Find oid and path of the database we're about to open.
* Since we're not yet up and running we have to use the hackish
* GetRawDatabaseInfo.
*/
GetRawDatabaseInfo
(
dbname
,
&
MyDatabaseId
,
datpath
);
if
(
!
OidIsValid
(
MyDatabaseId
))
...
...
@@ -248,13 +242,14 @@ InitPostgres(const char *dbname, const char *username)
/* Verify the database path */
if
(
access
(
fullpath
,
F_OK
)
==
-
1
)
elog
(
FATAL
,
"Database
\"
%s
\"
does not exist. The data directory '%s' is missing."
,
elog
(
FATAL
,
"Database
\"
%s
\"
does not exist.
\n\t
"
"The database subdirectory '%s' is missing."
,
dbname
,
fullpath
);
ValidatePgVersion
(
fullpath
);
if
(
chdir
(
fullpath
)
==
-
1
)
elog
(
FATAL
,
"Unable to change directory to '%s': %
s"
,
fullpath
,
strerror
(
errno
)
);
elog
(
FATAL
,
"Unable to change directory to '%s': %
m"
,
fullpath
);
SetDatabasePath
(
fullpath
);
}
...
...
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