Now per folder configs are loaded after PG_CONFIG
Call stopdb when deactivating env
This commit is contained in:
parent
14e4b865ca
commit
202b89c381
2 changed files with 5 additions and 5 deletions
|
@ -24,7 +24,7 @@ pg${PGV}.conf
|
|||
pg${PGV}-<Cluster #>.conf
|
||||
```
|
||||
|
||||
PostgreSQL local configs per are named similarly but starts with (.) dot and stored in worktree folder. These will superseed `${GIT_DIR}/pgconfigs/`:
|
||||
PostgreSQL local configs per folder are named similarly but starts with (.) dot and stored in worktree folder. These will overlay on top of `${GIT_DIR}/pgconfigs/` settings.
|
||||
|
||||
```
|
||||
.pg${PGV}.conf
|
||||
|
|
8
pg-env
8
pg-env
|
@ -314,19 +314,17 @@ pexec(){
|
|||
setupdb(){
|
||||
if [ -z "$1" ]; then
|
||||
initdb --data-checksums --username=${USER}
|
||||
echo "include = '${GIT_DIR}/pgconfigs/pg${PGV}.conf'" >> ${PGDATA}/postgresql.conf
|
||||
if [ -f "$(pwd)/.pg${PGV}.conf" ]; then
|
||||
echo "include = '$(pwd)/.pg${PGV}.conf'" >> ${PGDATA}/postgresql.conf
|
||||
else
|
||||
echo "include = '${GIT_DIR}/pgconfigs/pg${PGV}.conf'" >> ${PGDATA}/postgresql.conf
|
||||
fi
|
||||
else
|
||||
for NodeN in $@
|
||||
do
|
||||
initdb --data-checksums --username=${USER} -D ${PGDATA}-${NodeN}
|
||||
echo "include = '${GIT_DIR}/pgconfigs/pg${PGV}-${NodeN}.conf'" >> ${PGDATA}-${NodeN}/postgresql.conf
|
||||
if [ -f "$(pwd)/.pg${PGV}-${NodeN}.conf" ]; then
|
||||
echo "include = '$(pwd)/.pg${PGV}-${NodeN}.conf'" >> ${PGDATA}-${NodeN}/postgresql.conf
|
||||
else
|
||||
echo "include = '${GIT_DIR}/pgconfigs/pg${PGV}-${NodeN}.conf'" >> ${PGDATA}-${NodeN}/postgresql.conf
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
@ -353,6 +351,8 @@ resetall() {
|
|||
}
|
||||
|
||||
deactivate() {
|
||||
stopdb
|
||||
stopdb 1 2 3
|
||||
export PATH=${SAVED_PATH}
|
||||
export PS1=${SAVED_PS1}
|
||||
if [ ! -z "$VIRTUAL_ENV" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue