Skip to content

Commit

Permalink
Change postgres9 datadir location.
Browse files Browse the repository at this point in the history
The postgresql 9 data directory is changed from #{var}/postgres
to #{var}/postgres9.

This change certainly does not provide the capability for multiple
versionis to run concurrently, but it does provide some measures to
prevent data from being accidentally overwritten or converted to
a new version.

Closes Homebrew#1.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • Loading branch information
lotia authored and jacknagel committed Apr 22, 2012
1 parent 310dbc9 commit 682de63
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions postgresql9.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def caveats
If this is your first install, create a database with:
initdb #{var}/postgres
initdb #{var}/postgres9
If this is your first install, automatically load on login with:
mkdir -p ~/Library/LaunchAgents
Expand All @@ -118,10 +118,10 @@ def caveats
launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist
Or start manually with:
pg_ctl -D #{var}/postgres -l #{var}/postgres/server.log start
pg_ctl -D #{var}/postgres9 -l #{var}/postgres9/server.log start
And stop with:
pg_ctl -D #{var}/postgres stop -s -m fast
pg_ctl -D #{var}/postgres9 stop -s -m fast
Some machines may require provisioning of shared memory:
Expand Down Expand Up @@ -155,9 +155,9 @@ def startup_plist
<array>
<string>#{bin}/postgres</string>
<string>-D</string>
<string>#{var}/postgres</string>
<string>#{var}/postgres9</string>
<string>-r</string>
<string>#{var}/postgres/server.log</string>
<string>#{var}/postgres9/server.log</string>
</array>
<key>RunAtLoad</key>
<true/>
Expand All @@ -166,7 +166,7 @@ def startup_plist
<key>WorkingDirectory</key>
<string>#{HOMEBREW_PREFIX}</string>
<key>StandardErrorPath</key>
<string>#{var}/postgres/server.log</string>
<string>#{var}/postgres9/server.log</string>
</dict>
</plist>
EOPLIST
Expand Down

0 comments on commit 682de63

Please sign in to comment.