You've already forked postgres
mirror of
https://github.com/docker-library/postgres.git
synced 2025-07-28 10:42:06 +03:00
Postgres 10 renamed xlog to wal
This commit is contained in:
@ -38,10 +38,10 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
|
||||
chmod 775 /var/run/postgresql
|
||||
|
||||
# Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
|
||||
if [ "$POSTGRES_INITDB_XLOGDIR" ]; then
|
||||
mkdir -p "$POSTGRES_INITDB_XLOGDIR"
|
||||
chown -R postgres "$POSTGRES_INITDB_XLOGDIR"
|
||||
chmod 700 "$POSTGRES_INITDB_XLOGDIR"
|
||||
if [ "$POSTGRES_INITDB_WALDIR" ]; then
|
||||
mkdir -p "$POSTGRES_INITDB_WALDIR"
|
||||
chown -R postgres "$POSTGRES_INITDB_WALDIR"
|
||||
chmod 700 "$POSTGRES_INITDB_WALDIR"
|
||||
fi
|
||||
|
||||
exec gosu postgres "$BASH_SOURCE" "$@"
|
||||
@ -55,8 +55,8 @@ if [ "$1" = 'postgres' ]; then
|
||||
# look specifically for PG_VERSION, as it is expected in the DB dir
|
||||
if [ ! -s "$PGDATA/PG_VERSION" ]; then
|
||||
file_env 'POSTGRES_INITDB_ARGS'
|
||||
if [ "$POSTGRES_INITDB_XLOGDIR" ]; then
|
||||
export POSTGRES_INITDB_ARGS="$POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR"
|
||||
if [ "$POSTGRES_INITDB_WALDIR" ]; then
|
||||
export POSTGRES_INITDB_ARGS="$POSTGRES_INITDB_ARGS --waldir $POSTGRES_INITDB_WALDIR"
|
||||
fi
|
||||
eval "initdb --username=postgres $POSTGRES_INITDB_ARGS"
|
||||
|
||||
|
Reference in New Issue
Block a user