Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id A3C7A2E016D for ; Thu, 3 Jan 2008 18:54:22 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 25518-05 for ; Thu, 3 Jan 2008 18:54:17 -0400 (AST) Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id 7D0452E00B3 for ; Thu, 3 Jan 2008 18:54:17 -0400 (AST) Received: from perhan.alvh.no-ip.org (200-126-101-79.bk7-dsl.surnet.cl [200.126.101.79]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m03MsHYA003331 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Jan 2008 14:54:19 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 63E5147C8C; Thu, 3 Jan 2008 19:54:23 -0300 (CLST) Date: Thu, 3 Jan 2008 19:54:23 -0300 From: Alvaro Herrera To: Chris Browne Cc: pgsql-admin@postgresql.org Subject: Re: best practices for separating data and logs Message-ID: <20080103225423.GA15107@alvh.no-ip.org> References: <4544e0330801020946i314c0c8n5830dcc4512849ee@mail.gmail.com> <17603.1199297401@sss.pgh.pa.us> <601w90c8kq.fsf@dba2.int.libertyrms.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <601w90c8kq.fsf@dba2.int.libertyrms.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Thu, 03 Jan 2008 14:54:20 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/45 X-Sequence-Number: 27819 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.