Skip site navigation (1) Skip section navigation (2)

Re: binary logs: a location other than pg_xlog??

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: "James Cloos" <cloos(at)jhcloos(dot)com>, "pgsql-admin" <pgsql-admin(at)postgresql(dot)org>, "Lou Picciano" <loupicciano(at)comcast(dot)net>, jd(at)commandprompt(dot)com
Subject: Re: binary logs: a location other than pg_xlog??
Date: 2010-11-22 19:25:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> James Cloos <cloos(at)jhcloos(dot)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

In response to


pgsql-admin by date

Next:From: Khangelani GamaDate: 2010-11-23 06:48:37
Subject: Re: Postgres database : Out of balance problem from the same table
Previous:From: Craig JamesDate: 2010-11-22 19:20:16
Subject: Re: binary logs: a location other than pg_xlog??

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group