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 --wal-dir in keeper #865

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

Commits on Feb 18, 2022

  1. * keeper: support --wal-dir

    For those who run Postgres with a WAL directory symlinked to a separate
    disk (often for performance reasons) this commit adds a --wal-dir flag
    to the keeper.
    
    The symlink to a new WAL disk needs to be created as part of the
    database initialisation step, and also whenever we clobber the database,
    such as when taking a pg_basebackup (if pg_rewind is
    disabled/unavailable). By passing this directory as an argument to
    initdb and pg_basebackup, we can cover all the scenarios that the keeper
    erases and recreates the data directory, ensuring the symlink is always
    present.
    
    * Support waldir in pitr command
    
    For those who use different devices for wal and data directory, we
    should support the interpolation of the wal directory location in the
    pitr command as we do the data directory. This allows people to supply
    commands like:
    
    ```
    pg_basebackup --pgdata %d --waldir %w ...
    ```
    
    And have both data directory and wal directory templated. pg_basebackup
    and initdb are commands that support the concept of waldir, but this
    could be useful for any arbitrary pitr command.
    
    The commit also simplifies the implementation of the expand function to
    feature less mutation and slice offset accesses.
    
    * Also remove wal directory when destroying data
    
    If a wal directory is supplied then it's important to clean-out our wals
    along with our data directory. This commit renames the existing
    RemoveAll method to RemoveAllIfInitialized, which better represents what
    it does, and has it rely on a RemoveAll method that cleans-up both data
    directory and wal.
    
    Co-authored-by: Harry Maclean <harrymaclean@gocardless.com>
    2 people authored and sebasmannem committed Feb 18, 2022
    Configuration menu
    Copy the full SHA
    0d2d28b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    56fa48d View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2022

  1. Configuration menu
    Copy the full SHA
    10324de View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2022

  1. Fixing govet -shadow

    sebasmannem committed Feb 25, 2022
    Configuration menu
    Copy the full SHA
    3351414 View commit details
    Browse the repository at this point in the history

Commits on May 15, 2022

  1. Configuration menu
    Copy the full SHA
    f09e493 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6235160 View commit details
    Browse the repository at this point in the history