Commit Graph

14 Commits

Author SHA1 Message Date
Bruce Momjian 18e3992e56 Add standard error redirection for OS/X & darwin startup script.
Les Hill
2007-05-30 19:58:34 +00:00
Bruce Momjian 87a9473276 Update /contrib OS/X startup files, and move to a separate OS/X
directory.

Mark Cotner and David Fetter
2007-05-30 18:10:38 +00:00
Peter Eisentraut 6809c064d7 Be consistent about not using ECHO_N/ECHO_C (seems unnecessary on Linux). 2006-07-13 14:44:33 +00:00
Tom Lane c8196c87a7 Adjust postmaster to recognize that a lockfile containing its parent's PID
must be stale.  Tweak example startup scripts to not use pg_ctl but launch
the postmaster directly, thereby ensuring that only the postmaster's direct
parent shell will be a postgres-owned process.  In combination these should
fix the longstanding problem of the postmaster sometimes refusing to start
during reboot because it thinks the old lockfile is not stale.
2004-10-01 18:30:25 +00:00
Bruce Momjian af96aa9ab1 I wanted to submit some changes to the bundled postgres startup
script for Mac OS X. I added calls to utilize the bundled apache
rotatelogs script in the DB startup for log rotation. Also modified
startup parameters file to allow using the "SystemStarter" utility to
start/stop/restart postgres with a rotating log file.

The script credits David Wheeler, 2002. I wrote him a message about
the changes an he suggested I post them here. I explain some of the
changes below.

Not sure how to submit the changes. I have 3 files, "PostgreSQL"
script, "StartupParameters.plist" file, "pg_startupscript.diff" file.
The diff file was run against the original "PostgreSQL" script file.
I'll try attaching them to this message. If they get filtered I can
resend if needed.

Thanks.

Ray A.


------------------------------------

1) Changed the "Provides" parameter in StartupParameters.plist to
"PostgreSQL" from "postgres database" simply for ease of typing. It
seems that the SystemStarter utility uses the "Provides" value if you
want to control the script. This way I did not have to enclose it in
quotes on commandline. The modified StartupParameters.plist is now an
XML document also.


2) For the startup script I added 2 user modifiable variables:

# do you want to rotate the log files, 1=true 0=false
ROTATELOGS=1

# logfile rotate in seconds
ROTATESEC="604800"

I also added a non modifiable variable:

# The apache log rotation utility
LOGUTIL="/usr/sbin/rotatelogs"

I modified the StartService and RestartService functions to execute
the new commands if the user wants log rotation.

Ray Aspeitia
2004-03-09 01:59:13 +00:00
PostgreSQL Daemon 969685ad44 $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
Bruce Momjian f719f0f6db Typo fix in comment from David Wheeler 2003-11-12 03:27:26 +00:00
Bruce Momjian 9df03060e9 Fix for Linux startup script.
Slawomir Sudnik
2003-07-26 20:42:55 +00:00
Bruce Momjian 310c084921 Add Linux restart --- Slawomir Sudnik
Add "-l $PGLOG" for restart --- Darko Prenosil
2003-06-12 02:02:24 +00:00
Bruce Momjian b842726fc7 I've simplified the Darwin/Mac OS X startup script I submitted earlier
in the year. This version has only the two files required by the Darwin
startup bundle design. Plus the sh script now uses Darwin-standard
functions to start up PostgreSQL, and it checks for the presence of a
variable in /etc/hostconfig, as do other Darwin startup scripts.

I suggest that a new directory be created,
contrib/start-scripts/darwin, and that these two files be put into it.
Folks who want to use the script can read the comments inside it to
figure out how to use it.

David Wheeler
2002-12-09 21:26:09 +00:00
Bruce Momjian d4cafeba31 Patch to add comments to Linux startup script.
Rene Pijlman
2001-07-30 14:52:42 +00:00
Peter Eisentraut 031e1afa23 Pass -D option to pg_ctl because export PGDATA won't be preserved across
'su -l'.

Reported by <VASQUEZ_JASON@LILLY.COM>.
2001-04-19 19:17:44 +00:00
Peter Eisentraut fdf87fdf7b Add new FreeBSD start script that makes use of new pg_ctl functionality. 2001-02-10 00:13:23 +00:00
Peter Eisentraut bbac19a973 Remove outdated contrib/linux start scripts. Beat some sense into
contrib/init.d start script.  Place into more aptly named directory.  Maybe
we could add scripts for other platforms here later.
2001-02-08 19:53:33 +00:00