Re: best practices for separating data and logs - Mailing list pgsql-admin

From Alvaro Herrera
Subject Re: best practices for separating data and logs
Date
Msg-id 20080103225423.GA15107@alvh.no-ip.org
Whole thread Raw
In response to Re: best practices for separating data and logs  (Chris Browne <cbbrowne@acm.org>)
List pgsql-admin
Chris Browne wrote:

>  - Alternatively, to help establish common policies, for the "less
>    frequent" cases.
>
>   env:   Sets up PATH, MAN_PATH, PGPORT with the values used by
>          the backend in "this" init file

How does this work?  I have my own script to do things, and one of the
painful bits is setting up the environment.  What my script does is emit
the var definitions to stdout, so I have to run the script on `` to let
the current shell get the definitions.

>   logtail:  runs "tail -f" on the last log file for the cluster

Hmm, interesting.  Perhaps I oughta implement this.  Currently my script
starts the server by launching the postmaster in foreground, so there is
no need for this -- but I have frequently wished for an option to start
it in background, and be able to get at the log separately.

I use this script so frequently that I have also implemented bash
completion for it.  It is truly helpful.  (Of course, it deals with
multiple installations by getting the one to use as an argument, and
autocompletes that as well).

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-admin by date:

Previous
From: "Suresh Gupta VG"
Date:
Subject: Need some info on Postgresql
Next
From: "Scott Marlowe"
Date:
Subject: Re: Need some info on Postgresql