Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 9426C1337B58 for ; Mon, 22 Nov 2010 15:26:09 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 09536-01 for ; Mon, 22 Nov 2010 19:26:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id E14721337B4A for ; Mon, 22 Nov 2010 15:26:01 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id oAMJPfge014941; Mon, 22 Nov 2010 14:25:41 -0500 (EST) To: "Kevin Grittner" cc: "James Cloos" , "pgsql-admin" , "Lou Picciano" , jd@commandprompt.com Subject: Re: binary logs: a location other than pg_xlog?? In-reply-to: <4CEA69F30200002500037D0B@gw.wicourts.gov> 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> Comments: In-reply-to "Kevin Grittner" message dated "Mon, 22 Nov 2010 13:02:43 -0600" Date: Mon, 22 Nov 2010 14:25:41 -0500 Message-ID: <14940.1290453941@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/195 X-Sequence-Number: 36161 "Kevin Grittner" writes: > James Cloos wrote: >> I notice that everyone suggests using a symlink, but I never see >> anyone suggest just mounting a filesystem there. > I think initdb wants an empty directory. Once it creates the > directory structure with pg_xlog, if that's a mount point, it's a > bit awkward to mount there and then copy from behind the mount point > onto it. A symbolic link seems both safer and easier. Well, either way you're going to have to modify things after initdb. 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. (You might want to go back a few years in the archives and read Joe Conway's report of what happened to his DB when a soft NFS mount was a bit slow to mount one day. The symptoms for a missing pg_xlog directory would be different but not better.) A symlink seems to have a bit more error detection capability built in, especially if you 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. regards, tom lane