Re: best practices for separating data and logs

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Chris Browne <cbbrowne(at)acm(dot)org>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: best practices for separating data and logs
Date: 2008-01-03 22:54:23
Message-ID: 20080103225423.GA15107@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Mike White 2008-01-03 23:12:37 Postgres 7.4 VACUUM FULL multiple AccessExclusiveLocks?
Previous Message Shane Ambler 2008-01-03 19:09:31 Re: MacOS X 10.5.1 and compiling for multiple Architectures