Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 66C301337B71 for ; Tue, 23 Nov 2010 15:54:28 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 90824-09 for ; Tue, 23 Nov 2010 19:54:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id CBE4B1337B5C for ; Tue, 23 Nov 2010 15:54:20 -0400 (AST) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Tue, 23 Nov 2010 13:54:19 -0600 Message-Id: <4CEBC7870200002500037D94@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Tue, 23 Nov 2010 13:54:15 -0600 From: "Kevin Grittner" To: "Tom Lane" Cc: "Lou Picciano" ,, "James Cloos" , "pgsql-admin" Subject: Re: binary logs: a location other than pg_xlog?? References: <1557390103.902044.1290397034758.JavaMail.root@sz0093a.westchester.pa.mail.comcast.net> <4788.1290402707@sss.pgh.pa.us><4788.1290402707@sss.pgh.pa.us> (Tom Lane's message of "Mon, 22 Nov 2010 00:11:47 -0500") <4CEA69F30200002500037D0B@gw.wicourts.gov><4CEA69F30200002500037D0B@gw.wicourts.gov> <14940.1290453941@sss.pgh.pa.us> In-Reply-To: <14940.1290453941@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/204 X-Sequence-Number: 36170 Tom Lane wrote: > "Kevin Grittner" writes: >> A symbolic link seems both safer and easier. > The notion of mounting a filesystem directly there scares me, on > the whole. Here is the problem: what if someday that filesystem > happens not to be mounted? Then you have a bare mountpoint > directory, with no real way for the postmaster to notice that that > wasn't what you intended. Hilarity ensues. Yeah, we've experienced that in our shop with backup mount points -- so it was not quite so hilarious as live database directories, but funny enough from a space utilization perspective. We've taken to ensuring that the subdirectory used as a mount point is locked down to a root:root owner with no rights granted. Since we don't do our backups as the root user, failure to mount (or to mount in time) generates understandable errors in a timely fashion. I still much prefer a symlink for pg_xlog, but I thought that this suggestion might save someone some pain. > don't symlink to exactly the filesystem mount point but rather a > directory level or two down, so that the target dir is not there > if the mount fails. Good point. We have done it that way, but primarily for another reason -- we often have more than one database cluster running on the machine, and we generally have them share an xlog filesystem. -Kevin