View previous topic :: View next topic |
Author |
Message |
impact n00b
Joined: 02 Mar 2005 Posts: 48
|
Posted: Sun May 15, 2005 5:28 pm Post subject: Postgresql datadir... |
|
|
might not be the right forum. Sorry if its not.
I've always been a mysql guy, but just trying to switch to postgres.
Being a person that reformats my boxes often, I try to keep _everything_ that will survive a format in /home. Just a preference.
So naturally, I'd like my postgres data directory be /home/postgres/data
I've followed the two HOW-TOs, using more of this one though: http://gentoo-wiki.com/Talk:HOWTO_Configure_Postgresql
I've done what I think would succesfully implement a datadir of /home/postgres. I did the initdb, I switched my /etc/conf.d/postgresql to reflect the datadir and logdir. I would assume that would be all thats needed. However after that I still need to run the ebuild config, or else /etc/init.d/postgresql wont start (tried looking through it to see why with no avail).
After running that though, it runs fine, until I do an emerge -UD world and reboot. After rebooting it wont come up anymore, complaining about /dev/null not being accessible. Any ideas? |
|
Back to top |
|
|
limn l33t
Joined: 13 May 2005 Posts: 997
|
Posted: Sun May 15, 2005 7:53 pm Post subject: |
|
|
I've done what you are trying to do on a Debian box. You don't mention having modified /etc/passwd to reflect postgres's changed $HOME: i.e.
/var/lib/postgresql -> /home/postgres |
|
Back to top |
|
|
impact n00b
Joined: 02 Mar 2005 Posts: 48
|
Posted: Sun May 15, 2005 9:27 pm Post subject: |
|
|
Time to hang my head in shame.
I'll try that when I get home... |
|
Back to top |
|
|
impact n00b
Joined: 02 Mar 2005 Posts: 48
|
Posted: Tue May 17, 2005 12:36 am Post subject: |
|
|
Hmmm, tried that, again, it worked until I rebooted, at which time it refused to start.... heres the exact output.
On another note, if I try to start it once (Which fails), it wont try again, it says "already started" until I reboot. Theres no PID files, no processes running, nothing, which is confusing...
marvin root # /etc/init.d/postgresql start
* Starting PostgreSQL...
sh: line 1: /dev/null: Permission denied
fgets failure: Success
The program "postmaster" is needed by pg_ctl but was not found in the
same directory as "/usr/bin/pg_ctl".
Check your installation.
Any thoughts? |
|
Back to top |
|
|
impact n00b
Joined: 02 Mar 2005 Posts: 48
|
Posted: Tue May 17, 2005 12:45 am Post subject: |
|
|
hmmm, was playing around
my /dev/null was set to 660
once I set it to 666, postgres started just fine...
1: what should my /dev/null be normally?
2: Why would it switch? |
|
Back to top |
|
|
impact n00b
Joined: 02 Mar 2005 Posts: 48
|
Posted: Tue May 17, 2005 12:55 am Post subject: |
|
|
more playing...
EVERY time I reboot, it switches to 660, my main computer runs at 666
I assume 666 is default, 3 of my comps have that, and my server keeps dropping it to 660 on reboots...
Anyone? |
|
Back to top |
|
|
limn l33t
Joined: 13 May 2005 Posts: 997
|
|
Back to top |
|
|
impact n00b
Joined: 02 Mar 2005 Posts: 48
|
Posted: Tue May 17, 2005 8:34 pm Post subject: |
|
|
That looks to be the problem.
At work right now, but I'll try it when I get home, thanks a bunch =P |
|
Back to top |
|
|
|