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

Support different log rotation plan #954

Open
annielzy opened this issue Dec 4, 2023 · 1 comment
Open

Support different log rotation plan #954

annielzy opened this issue Dec 4, 2023 · 1 comment

Comments

@annielzy
Copy link

annielzy commented Dec 4, 2023

Issue Summary:

Currently, Spilo assumes that the Postgres log is rotated based on weekdays, which is not an ideal logging plan for actual production use. However, if we try to modify the log rotation setup, this assumption will cause problems in the backup and restore process, as it will not reset all possible recovery targets and retry without the correct log file:

if int(cluster_version) >= 13 and 'recovery ended before configured recovery target was reached' in logs:

Proposal:

Although there are several places in Spilo that assume the default log rotation plan based on weekdays, the only place that is blocking overrides is:

This can be easily fixed by modifying the method of finding the current Postgres log file.

@hughcapet
Copy link
Member

Well, as for us it is the „ideal logging plan“ happily used in production environment for many years now (given we have daily logs shipment to s3), we are not planning to invest time into this improvement.
But you can of course implement it yourself and submit a pr (with the reasoning provided).

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

2 participants