# Commands to set up and start PostgreSQL's postmaster daemon.

# This file is meant to be sourced by other scripts, not run on its own.

echo -e "\n================================\n
Starting postmaster implementation of Pathena server
on $(date).\n" >> log/pg_server
#on $(date).\n" | tee -a log/pg_server >> log/pg_stderr.log

# Start postmaster with nohup so it survives logouts.
# Use postmaster option -F to inhibit fsync.
# Pipe output through tee so status messages get logged as well as
# displayed in shell.

nohup $PGBIN/pg_ctl -D data -o "-F -i -p $PGPORT" -l log/pg_server start \
 | tee -a log/pg_server
