Config | Defaults | Description |
---|---|---|
MAKEFLAGS | make settings ex: '-j 4' |
Config | Defaults | Description |
---|---|---|
PGV | None | PostgreSQL Major Version or HEAD |
GIT_DIR | ${HOME}/gitwork | Your GIT workspace directory name |
PG_DEV_NAME | postgresql- | Name of the source code folder (a git worktree) |
PG_INST_NAME | <PG_DEV_NAME>-INST | Name of the install folder |
PG_ENV_CFLAGS | Extra CFLAGS |
PostgreSQL extra configs shall be stored in ${GIT_DIR}/pgconfigs/
in this naming convention:
pg${PGV}.conf
pg${PGV}-<Cluster #>.conf
Config | Defaults | Description |
---|---|---|
PG_ENV_DEBUG | Set this var to non empty to print some debug info |
You can create ~/.pg-env with your global settings
You can create ./.pg-env with your per folder settings
You can also export PGV=<major version|HEAD>
PGPORT will be 5400 + PGV. When PGV is set to HEAD PGPORT is set to 5432 When working with multiple Clusters, passed on id is added as a prefix to PGPORT Note: Max 1 - 5 Clusters are allowed.
- Clone
- Symlink
ln -s <Clone Dir>/pg-env ~/bin/pg-env
Visit https://commitfest.postgresql.org/ and click on active commitfest and from the URL record CommitFest ID Now click on a commitfest entry and from the URL record commitfest Entry ID Ex: https://commitfest.postgresql.org/48/4962/ commitfest IS is 48 and Entry ID is 4962
chdir to folder where PostgreSQL source is cloned
For testing against development HEAD
pg-env commitfest 48 4962
For testing against a stable branch ex: release 12
pg-env commitfest 48 4962 REL_12_STABLE
source ~/bin/pg-env
distclean
compile
compile_contrib
startdb <Clusters>
ex:
startdb
startdb 1 2 3
stopdb <Clusters>
ex:
stopdb
stopdb 1 2 3
restartdb <Clusters>
ex:
restartdb
restartdb 1 2 3
cleandb <Clusters>
ex:
cleandb
cleandb 1 2 3
setupdb <Clusters>
ex:
setupdb
setupdb 1 2 3
resetdb <Clusters>
ex:
resetdb
resetdb 1 2 3
resetall <Clusters>
ex:
resetall
resetall 1 2 3
deactivate
Exit from pg-env