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
bda27e50
Commit
bda27e50
authored
May 16, 2011
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add pg_upgrade check to make sure the user has full access permission in
the current directory; if not, throw an error.
parent
6c19bd96
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
contrib/pg_upgrade/exec.c
contrib/pg_upgrade/exec.c
+5
-0
contrib/pg_upgrade/pg_upgrade.c
contrib/pg_upgrade/pg_upgrade.c
+0
-4
No files found.
contrib/pg_upgrade/exec.c
View file @
bda27e50
...
...
@@ -93,6 +93,11 @@ is_server_running(const char *datadir)
void
verify_directories
(
void
)
{
if
(
access
(
"."
,
R_OK
|
W_OK
|
X_OK
)
!=
0
)
pg_log
(
PG_FATAL
,
"You must have full access permissions in the current directory.
\n
"
);
prep_status
(
"Checking old data directory (%s)"
,
old_cluster
.
pgdata
);
check_data_dir
(
old_cluster
.
pgdata
);
check_ok
();
...
...
contrib/pg_upgrade/pg_upgrade.c
View file @
bda27e50
...
...
@@ -155,17 +155,13 @@ setup(char *argv0, bool live_check)
/* no postmasters should be running */
if
(
!
live_check
&&
is_server_running
(
old_cluster
.
pgdata
))
{
pg_log
(
PG_FATAL
,
"There seems to be a postmaster servicing the old cluster.
\n
"
"Please shutdown that postmaster and try again.
\n
"
);
}
/* same goes for the new postmaster */
if
(
is_server_running
(
new_cluster
.
pgdata
))
{
pg_log
(
PG_FATAL
,
"There seems to be a postmaster servicing the new cluster.
\n
"
"Please shutdown that postmaster and try again.
\n
"
);
}
/* get path to pg_upgrade executable */
if
(
find_my_exec
(
argv0
,
exec_path
)
<
0
)
...
...
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