Skip to content

Use correct version of pg_dump to avoid restore errors #15

Description

@jfinzel

We do this in the following way in our DBA environment, though we are all running on Debian, so it's considerably easier:

  1. Get the version from cluster_info. This could also be done with SHOW server_version; Our specific script that gives us this is clusterinfo-vars payments_a --version. Refer to https://git.enova.com/cfengine/postgres/blob/master/DBA-Tools/clusterinfo-vars for this script.

  2. Find the path of the binary using the version, i.e.

#!/bin/bash

set -eu

destination_cluster=$1
eval "$(clusterinfo-vars $destination_cluster version)"
echo "/usr/lib/postgresql/$version/bin"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions