Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
bda27e50
Commit
bda27e50
authored
14 years ago
by
Bruce Momjian
Browse files
Options
Downloads
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
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
contrib/pg_upgrade/exec.c
+5
-0
5 additions, 0 deletions
contrib/pg_upgrade/exec.c
contrib/pg_upgrade/pg_upgrade.c
+0
-4
0 additions, 4 deletions
contrib/pg_upgrade/pg_upgrade.c
with
5 additions
and
4 deletions
contrib/pg_upgrade/exec.c
+
5
−
0
View file @
bda27e50
...
@@ -93,6 +93,11 @@ is_server_running(const char *datadir)
...
@@ -93,6 +93,11 @@ is_server_running(const char *datadir)
void
void
verify_directories
(
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
);
prep_status
(
"Checking old data directory (%s)"
,
old_cluster
.
pgdata
);
check_data_dir
(
old_cluster
.
pgdata
);
check_data_dir
(
old_cluster
.
pgdata
);
check_ok
();
check_ok
();
...
...
This diff is collapsed.
Click to expand it.
contrib/pg_upgrade/pg_upgrade.c
+
0
−
4
View file @
bda27e50
...
@@ -155,17 +155,13 @@ setup(char *argv0, bool live_check)
...
@@ -155,17 +155,13 @@ setup(char *argv0, bool live_check)
/* no postmasters should be running */
/* no postmasters should be running */
if
(
!
live_check
&&
is_server_running
(
old_cluster
.
pgdata
))
if
(
!
live_check
&&
is_server_running
(
old_cluster
.
pgdata
))
{
pg_log
(
PG_FATAL
,
"There seems to be a postmaster servicing the old cluster.
\n
"
pg_log
(
PG_FATAL
,
"There seems to be a postmaster servicing the old cluster.
\n
"
"Please shutdown that postmaster and try again.
\n
"
);
"Please shutdown that postmaster and try again.
\n
"
);
}
/* same goes for the new postmaster */
/* same goes for the new postmaster */
if
(
is_server_running
(
new_cluster
.
pgdata
))
if
(
is_server_running
(
new_cluster
.
pgdata
))
{
pg_log
(
PG_FATAL
,
"There seems to be a postmaster servicing the new cluster.
\n
"
pg_log
(
PG_FATAL
,
"There seems to be a postmaster servicing the new cluster.
\n
"
"Please shutdown that postmaster and try again.
\n
"
);
"Please shutdown that postmaster and try again.
\n
"
);
}
/* get path to pg_upgrade executable */
/* get path to pg_upgrade executable */
if
(
find_my_exec
(
argv0
,
exec_path
)
<
0
)
if
(
find_my_exec
(
argv0
,
exec_path
)
<
0
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment