pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: James Cloos <cloos@jhcloos.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Cc: Lou Picciano <loupicciano@comcast.net>
Cc: jd@commandprompt.com
Subject: Re: binary logs: a location other than pg_xlog??
Date: Mon, 22 Nov 2010 14:25:41 -0500
Message-ID: <14940.1290453941@sss.pgh.pa.us> (raw)
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>
	<m3vd3p2o9l.fsf@jhcloos.com>
	<4CEA69F30200002500037D0B@gw.wicourts.gov>

"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> James Cloos <cloos@jhcloos.com> 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



view thread (13+ messages)  latest in thread

Message-ID: <14940.1290453941@sss.pgh.pa.us>
Permalink:  ../14940.1290453941@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14940.1290453941@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, Kevin.Grittner@wicourts.gov, cloos@jhcloos.com, loupicciano@comcast.net, jd@commandprompt.com
  Subject: Re: binary logs: a location other than pg_xlog??
  In-Reply-To: <14940.1290453941@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox