Commit Graph

541 Commits

Author SHA1 Message Date
Peter Eisentraut c154fc3a20 Apply message style guide to frontend programs. 2003-07-23 08:47:41 +00:00
Bruce Momjian 54ca7a7b13 (Now featuring documentation: fixed some typos, expanded the
Envrironment and Files section, explained exactly what -w
does)

This is a patch which allows pg_ctl to make an intelligent
guess as to the proper port when running 'psql -l' to
determine if the database has started up (the -w flag).

The environment variable PGPORT is used. If that is not found,
it checks if a specific port has been set inside the postgresql.conf
file. If it is has not, it uses the port that Postgres was
compiled with.

Greg Sabino Mullane  greg@turnstep.com
2003-03-20 05:00:14 +00:00
Bruce Momjian ba16df979c Propogate pg_ctl -D to the postmaster as a -D flag for identification by
ps for multiple postmasters, for Kevin Brown.
2003-02-14 22:18:25 +00:00
Peter Eisentraut 4cff161703 Improve formatting of --help output. 2002-10-18 22:05:36 +00:00
Bruce Momjian d04e9137c9 Reverse out XLogDir/-X write-ahead log handling, per discussion.
Original patch from Thomas.
2002-08-17 15:12:07 +00:00
Thomas G. Lockhart af704cdfb4 Implement WAL log location control using "-X" or PGXLOG. 2002-08-04 06:26:38 +00:00
Bruce Momjian ec793794b2 Another "$@" cleanup with new syntax, ${1+"$@"}. 2002-07-19 15:31:43 +00:00
Bruce Momjian 1128c54a09 Fix "$@" to ${1:+"$@"} for older shells. 2002-07-19 13:50:06 +00:00
Bruce Momjian 40cd81cff4 This is a simple patch to put double quotes around a few cases in
pg_ctl.sh which were unquoted when inside of [].

Justin Clift
2001-09-29 03:09:32 +00:00
Tom Lane 196700c372 Add 'reload' option to pg_ctl to send SIGHUP to the postmaster. 2001-09-21 21:10:56 +00:00
Bruce Momjian 357d9bdce5 Move export to a separate line, per Peter E. 2001-07-11 19:36:41 +00:00
Bruce Momjian e41e0fc589 Move export PGDATA to the proper place. Quote some variable substitutions. 2001-07-11 16:16:52 +00:00
Bruce Momjian 443db06d84 Fix duplication of -D during pg_ctl restart, from Peter E's patch. 2001-07-11 04:57:34 +00:00
Peter Eisentraut 9ae6819038 Make sure that the postmaster options (from postmaster.opts[.default] or
-o option) are properly dequoted.  Also, always pass an explicit -D option
to postmaster, don't rely on it being set in postmaster.opts.
2001-04-21 11:23:58 +00:00
Tom Lane 7c9f29546c Give postmaster enough time to update the pidfile before checking to
see if it's been updated.  Skip the whole mess if we didn't see any
old pidfile.
2001-03-18 20:27:11 +00:00
Peter Eisentraut 088c0b9546 Make -w the default for shut down, add -W option to specify no wait.
Add -l option to name log file.  Set umask to 077.
Proper file descriptor redirection to allow postmaster to detach from
shell's process group.
Add -s option to turn off informational messages.
2001-02-08 19:39:24 +00:00
Tatsuo Ishii c0f9597b31 Imporve messages. 2000-12-30 06:10:43 +00:00
Tom Lane 792b0f4666 Get rid of not-very-portable fcntl(F_SETLK) mechanism for locking the Unix
socket file, in favor of having an ordinary lockfile beside the socket file.
Clean up a few robustness problems in the lockfile code.  If postmaster is
going to reject a connection request based on database state, it will now
tell you so before authentication exchange not after.  (Of course, a failure
after is still possible if conditions change meanwhile, but this makes life
easier for a yet-to-be-written pg_ping utility.)
2000-11-29 20:59:54 +00:00
Tom Lane 92fd384779 After going to the trouble of finding where psql lives, seems like
pg_ctl should invoke it from there, not use whatever random psql might
(or might not) live in its $PATH.
2000-11-27 02:50:17 +00:00
Peter Eisentraut c25b4dbf03 Update pg_ctl ref page, help output, messages. Some repair to work better
with current postmaster.
2000-11-25 17:17:30 +00:00
Peter Eisentraut 7300a28a67 Ignore missing postmaster.opts.default file. 2000-10-24 19:11:15 +00:00
Peter Eisentraut 335248c9b7 Support for DESTDIR make variable. This is used as in `make install
DESTDIR=/else/where' and prepends the value of DESTDIR to the full
installation paths (e.g., /else/where/usr/local/pgsql/bin). This allows
users to install the package into a location different from the one that
was configured and hard-coded into various scripts, e.g., for creating
binary packages.

DESTDIR is in many cases preferrable over `make install
prefix=/else/where' because

a) `prefix' affects the path that is hard-coded into the files, which can
lead to a `make install prefix=xxx' (as done by the regression test
driver) corrupting the files in the source tree with wrong paths.

b) it doesn't work at all if a directory was overridden to not depend on
`prefix', e.g., --sysconfdir=/etc.

(Updating the regression test driver to use DESTDIR is a separate
undertaking.)

See also autoconf@gnu.org, From: Akim Demaille <akim@epita.fr>, Date: 08
Sep 2000 12:48:59 +0200, Message-ID:
<mv4em2vb1lw.fsf@nostromo.lrde.epita.fr>, Subject: Re: HTML format
documentation.
2000-09-17 13:02:52 +00:00
Peter Eisentraut da06bc1d40 Make building scripts kind of consistent in look and feel, kind of immune
to parallel make, kind of resistent to corruption due to incomplete builds.
2000-09-08 18:29:28 +00:00
Peter Eisentraut 424f0edcb8 Fix relative path references so that make knowns which dependencies refer
to one another. Sort out builddir vs srcdir variable namings. Remove some
now obsoleted make variables.
2000-08-31 16:12:35 +00:00
Peter Eisentraut 5bb8b62983 Makefile cleanup for bin and pl subtrees. They should now support
all the standard semantics. Also get rid of Makefile.in's on the
way and instead declare all variables in Makefile.global.
2000-06-27 00:32:06 +00:00
Peter Eisentraut 209aa77d98 New ps display code, works on more platforms.
Install a default configuration file.

Clean up some funny business in the config file code.
2000-06-04 01:44:38 +00:00
Tatsuo Ishii e308786889 Update pg_ctl so that it does not redirect outputs from postmaster
to a temp file.
2000-04-25 01:07:23 +00:00
Tatsuo Ishii 88a30e68f6 Change postmaster.opts.default.sample. remove -S option.
With the default option, pg_ctl can show messages from
postmaster upon its failure.
2000-04-16 03:50:00 +00:00
Tatsuo Ishii a92ab528ef Enhance pg_ctl so that it prints error messages from postmaster
if it fails to start up it (this is only vaild if -w is given).
2000-03-27 02:12:03 +00:00
Tatsuo Ishii 44a9639123 Detect postmaster being ready by calling psql -l rathern than
checking postmaster.pid. It's not enough to check the existence
of postmaster.pid since DB recovery might be running.
2000-03-14 08:34:47 +00:00
Bruce Momjian f43ec05d05 I've made a diff against the 7.0beta1 tree that accomplishes several things:
1) adds NetBSD shared lib support on both ELF and a.out platforms

        2) replaces "-L$(LIBPQDIR) -lpq" with "$(LIBPQ)" defined in
           Makefile.global.  This makes it much easier to build stuff in
           the source tree after you've already installed the libraries.

        3) adds TEMPLATEDIR in Makefile.global that indicates where the
           database templates are stored.  This separates the template files
           from real libraries that are installed in $(LIBDIR).
        4) changes include order of <readline/readline.h> and <readline.h>.
           The latest GNU readline installs its headers under a readline
           subdirectory.

In addition to applying the patch below the following files need to be copied:

        backend/port/dynloader:
                bsd.h -> netbsd.h
                bsd.c -> netbsd.c
        include/port:
                bsd.h -> netbsd.h
        makefiles:
                Makefile.bsd -> Makefile.netbsd

It would be great to see this incorporated into the source tree before
the 7.0 release is cut.

        Thanks!

     -- Johnny C. Lam <lamj@stat.cmu.edu>
2000-03-08 01:58:46 +00:00
Tatsuo Ishii 2bda7a4406 change copyright year 1999->2000
Minor fix
2000-02-07 04:31:10 +00:00
Tatsuo Ishii 418b270020 Fix a bug when specfying -D option.
fix suggested by Keith Parks.
2000-02-06 00:49:03 +00:00
Tatsuo Ishii b2ff7d08ad Change format of postmaster.opts.default.
Executable file name (postmaster) no more included in the file.
2000-01-23 08:20:24 +00:00
Tatsuo Ishii 359652898b Add more portability to echo -n (code stolen from createlang)
Do not start postmaster if postgres is running
2000-01-09 12:06:52 +00:00
Tatsuo Ishii e80ade5e22 Fix minor bug. 1999-12-22 04:41:17 +00:00
Tatsuo Ishii b680d5bec7 Add installation of pg_ctl
Locate path of postmaster in a portable way (stolen from initdb)
Add postmaster.opts.default.sample which should be copied into
$PGLIB in the installtion process. Also, it will be installed into
$PGDATA while initdb is running.
1999-12-22 04:12:55 +00:00
Bruce Momjian 0dec669a0f Change $< to $+ in scripts Makefile, and clean up pg_encoding if logic. 1999-12-08 10:29:55 +00:00
Tatsuo Ishii 8ad4f99b73 Fix the case of -o given 1999-12-06 08:49:00 +00:00
Tatsuo Ishii 8231a7ab20 Fix minor bugs 1999-12-06 08:35:34 +00:00
Tatsuo Ishii 5b912b089c pg_ctl: a script to start/stop/restart and report status of postmaster. 1999-12-06 07:23:41 +00:00