mirror of
https://github.com/postgres/postgres.git
synced 2025-08-02 09:26:47 +03:00
config
contrib
adminpack
amcheck
auth_delay
auto_explain
bloom
bool_plperl
btree_gin
btree_gist
citext
cube
dblink
dict_int
dict_xsyn
earthdistance
file_fdw
fuzzystrmatch
hstore
hstore_plperl
hstore_plpython
intagg
intarray
isn
jsonb_plperl
jsonb_plpython
lo
ltree
ltree_plpython
oid2name
old_snapshot
pageinspect
passwordcheck
pg_buffercache
pg_freespacemap
pg_prewarm
pg_stat_statements
pg_surgery
pg_trgm
pg_visibility
pgcrypto
pgrowlocks
pgstattuple
postgres_fdw
seg
sepgsql
spi
sslinfo
start-scripts
macos
README
org.postgresql.postgres.plist
postgres-wrapper.sh
freebsd
linux
tablefunc
tcn
test_decoding
tsm_system_rows
tsm_system_time
unaccent
uuid-ossp
vacuumlo
xml2
Makefile
README
contrib-global.mk
doc
src
.dir-locals.el
.editorconfig
.git-blame-ignore-revs
.gitattributes
.gitignore
COPYRIGHT
GNUmakefile.in
HISTORY
Makefile
README
README.git
aclocal.m4
configure
configure.ac
The scripts in contrib/start-scripts/osx don't work at all on macOS 10.10 (Yosemite) or later, because they depend on SystemStarter which Apple deprecated long ago and removed in 10.10. Add a new subdirectory contrib/start-scripts/macos with scripts that use the newer launchd infrastructure. Since this problem is independent of which Postgres version you're using, back-patch to all supported branches. Discussion: https://postgr.es/m/31338.1510763554@sss.pgh.pa.us
25 lines
1.1 KiB
Plaintext
25 lines
1.1 KiB
Plaintext
To make macOS automatically launch your PostgreSQL server at system start,
|
|
do the following:
|
|
|
|
1. Edit the postgres-wrapper.sh script and adjust the file path
|
|
variables at its start to reflect where you have installed Postgres,
|
|
if that's not /usr/local/pgsql.
|
|
|
|
2. Copy the modified postgres-wrapper.sh script into some suitable
|
|
installation directory. It can be, but doesn't have to be, where
|
|
you keep the Postgres executables themselves.
|
|
|
|
3. Edit the org.postgresql.postgres.plist file and adjust its path
|
|
for postgres-wrapper.sh to match what you did in step 2. Also,
|
|
if you plan to run the Postgres server under some user name other
|
|
than "postgres", adjust the UserName parameter value for that.
|
|
|
|
4. Copy the modified org.postgresql.postgres.plist file into
|
|
/Library/LaunchDaemons/. You must do this as root:
|
|
sudo cp org.postgresql.postgres.plist /Library/LaunchDaemons
|
|
because the file will be ignored if it is not root-owned.
|
|
|
|
At this point a reboot should launch the server. But if you want
|
|
to test it without rebooting, you can do
|
|
sudo launchctl load /Library/LaunchDaemons/org.postgresql.postgres.plist
|