Skip to content

detect PGDATA without starting postgres #15

@jamescassell

Description

@jamescassell

This will detect PGDATA for the postgresql systemd unit.
(set -euo pipefail ; eval "$(systemctl show -p Environment postgresql | grep -oP '(?<=^Environment=).*' || echo false)" ; echo $PGDATA)

Inspired by how postgresql-setup script detects the correct location.

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