Su - $PGUSER -c "$PGCTL status -D '$PGDATA'"Įcho "Usage: $0 " 1>&2 Su - $PGUSER -c "$PGCTL reload -D '$PGDATA' -s" Su - $PGUSER -c "$PGCTL stop -D '$PGDATA' -s -m fast -w" Su - $PGUSER -c "$PGCTL stop -D '$PGDATA' -s -m fast" Su - $PGUSER -c "$DAEMON_ENV $PGCTL start -w -D '$PGDATA' &" >$PGLOG 2>&1 Test -e "$PG_OOM_ADJUST_FILE" & echo "$PG_MASTER_OOM_SCORE_ADJ" > "$PG_OOM_ADJUST_FILE" If ĭAEMON_ENV="PG_OOM_ADJUST_FILE=$PG_OOM_ADJUST_FILE PG_OOM_ADJUST_VALUE=$PG_CHILD_OOM_SCORE_ADJ" # If we want to tell child processes to adjust their OOM scores, set up the PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # The path that is to be used for the script For such a system, uncomment these three lines instead: # /proc/self/oom_adj, which works similarly except for having a different # Older Linux kernels may not have /proc/self/oom_score_adj, but instead #PG_OOM_ADJUST_FILE=/proc/self/oom_score_adj # of the way it accounts for shared memory). # OOM killer (which will tend to preferentially kill the postmaster because # It's often a good idea to protect the postmaster from being killed by the # Who to run the postmaster as, usually "postgres". Once you get to know it, the process is pretty straightforward. How do you setup a PostgreSQL service on Ubuntu? Now you want to run the server in a way that users can start, stop, & restart the server in pretty much the same way they do for other daemons and services running on your server. You have created the data directory and initialized the database. Ok, so you have a PostgreSQL distribution on your Ubuntu server. PostgreSQL 9 Cookbook – Chinese Edition.PostgreSQL Server Programming Cookbook – 2nd Edition.PostgreSQL 9 Administration Cookbook – 3rd Edition.PostgreSQL High Availability Cookbook – 2nd Edition.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |