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

[DPE-5263] Fix .psql_history write #50

Draft
wants to merge 3 commits into
base: 14/edge
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.snap
exported.txt
*__pycache__*
.idea
2 changes: 2 additions & 0 deletions snap/hooks/install
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ cp $SNAP/etc/pgbackrest.conf $SNAP_DATA/etc/pgbackrest
sed -i "s:/var/lib/pgbackrest:$VAR_LIB_PGBACKREST:g" $SNAP_DATA/etc/pgbackrest/pgbackrest.conf
echo "pg1-path=$SNAP_COMMON/var/lib/postgresql" >> $SNAP_DATA/etc/pgbackrest/pgbackrest.conf
echo "pg1-user=snap_daemon" >> $SNAP_DATA/etc/pgbackrest/pgbackrest.conf
touch $SNAP_COMMON/.psql_history
chown 584788:root $SNAP_COMMON/.psql_history

chown -R 584788:root $SNAP_COMMON/*
chown -R 584788:root $SNAP_DATA/*
1 change: 1 addition & 0 deletions snap/local/etc/postgresql-common/.psqlrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
\set HISTFILE /var/snap/charmed-postgresql/common/.psql_history
2 changes: 2 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ apps:
- network-bind
psql:
command: usr/bin/psql
environment:
PSQLRC: /snap/charmed-postgresql/current/etc/postgresql-common/.psqlrc
plugs:
- network
syncobj-admin:
Expand Down