Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quick fix to vacuum function and more info in README #4

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

john3571
Copy link
Contributor

@john3571 john3571 commented Oct 4, 2012

No description provided.

@john3571
Copy link
Contributor Author

john3571 commented Oct 4, 2012

fixed cmd

@@ -277,7 +277,7 @@ sub backup_database{
sub vacuum{
unless($skip_vacuum){
echo("vacuumdb started...");
cmd("vacuumdb -a -z -U $db_user 2>&1");
cmd("su $db_user -c \"vacuumdb -a -z \" 2>&1");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove su. the cron should be run as postgres user

@john3571
Copy link
Contributor Author

john3571 commented Oct 9, 2012

there is a new vacuum command, it is better than the old one.

It will always execute the vacuum command as postgres user. if the cron runs from root, it will use an su postgres. if the cron is run as postgres user, it will use the vacuum command directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants