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

pg_repack cron output is logged to the same file and clobbered #30

Closed
andrewm3 opened this issue Jun 20, 2019 · 3 comments
Closed

pg_repack cron output is logged to the same file and clobbered #30

andrewm3 opened this issue Jun 20, 2019 · 3 comments

Comments

@andrewm3
Copy link

The pg_repack cronjobs all log to the same file and overwrite it when they run, making it difficult to troubleshoot certain jobs.

The logs should be appended or each job should have it's own file.

Relevant code in manifests/maintenance/pg_repack.pp:

 $logging = "> ${logging_directory}/output.log 2>&1"
@npwalker
Copy link
Contributor

@andrewm3 I think this was a conscious decision because I didn't want to deal with log rotation.

Thoughts on how to deal with an ever-growing log?

@andrewm3
Copy link
Author

I think that's fair. It's more important that each job doesn't clobber the output of the other than keeping a long running record IMO, so perhaps just different files for each one would be sufficient.

jarretlavallee pushed a commit that referenced this issue Aug 7, 2020
Prior to this commit, the repack maintenance jobs would all log to
`output.log` and clobber the log each time a job ran. This commit moves
the logs for each repack into their own file so they do not overwrite
other repack jobs logs.
jarretlavallee added a commit that referenced this issue Aug 7, 2020
(GH-30) Update repack logging to separate files
@jarretlavallee
Copy link
Contributor

Merged in #43

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

No branches or pull requests

3 participants