Skip to content

bump version - #4

Open
f4rx wants to merge 1 commit into
imgabrieldev:mainfrom
f4rx:bump_version
Open

f4rx wants to merge 1 commit into
imgabrieldev:mainfrom
f4rx:bump_version

Conversation

@f4rx

@f4rx f4rx commented Sep 10, 2026

Copy link
Copy Markdown

PR Description

PostgreSQL 18.6 upgrade, schedule configurability and logging improvements (v1.1.0)

Summary

Upgrades the image to PostgreSQL 18.6 and WAL-G v3.0.9, makes the backup schedule configurable via environment variables, moves all logging to container stdout (docker logs), and improves the reliability of cron jobs and the initial backup.

Key changes

1. Version upgrades

  • Base image: PostgreSQL 16 → 18.6
  • WAL-G: v3.0.7 → v3.0.9 (new artifact naming: wal-g-pg-24.04-*)

2. Configurable backup schedule

  • Backup schedules are now set via environment variables (standard cron expressions):
    • WALG_INCREMENTAL_SCHEDULE (default: 0 0,2,6,8,10,12,14,18,20,22 * * * — every 2 hours except full-backup hours)
    • WALG_FULL_BACKUP_SCHEDULE (default: 0 4,16 * * * — twice a day)
    • WALG_CLEANUP_SCHEDULE (default: 0 5 * * * — daily at 5 AM)

3. stdout logging instead of log files

  • Removed writing to /var/log/wal-g/*.log in all scripts — logs are now available via docker logs (container best practice, compatible with Docker logging drivers: json-file, fluentd, loki, etc.)
  • Cron job output redirected to /proc/1/fd/1 (PID 1)
  • Removed local log cleanup from cleanup-cron.sh (no longer needed)

4. Cron job fixes

  • Cron now runs as root with privilege drop to postgres via gosu
  • Environment variables added to the crontab (cron does not inherit container env)
  • Added flock -n to prevent concurrent job execution

5. Data directory detection

  • Data dir is now resolved dynamically via SHOW data_directory instead of hardcoded /var/lib/postgresql/data (fallback: PGDATA)

6. Initial backup reliability

  • Retry logic (up to 3 attempts with 15 s interval) on failure
  • Improved PostgreSQL readiness check: 90 attempts (3 min) + process verification via /proc/PID/comm

7. Docs

  • README and .env.example updated: new schedule, environment variables, docker logs usage, removed the log volume from the compose example

Breaking changes

  • Log files are no longer written to /var/log/wal-g/ — use docker logs instead. If you mounted a logs volume, it can be removed.

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.

1 participant