Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Postgresql datadir...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
impact
n00b
n00b


Joined: 02 Mar 2005
Posts: 48

PostPosted: Sun May 15, 2005 5:28 pm    Post subject: Postgresql datadir... Reply with quote

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
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Sun May 15, 2005 7:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
impact
n00b
n00b


Joined: 02 Mar 2005
Posts: 48

PostPosted: Sun May 15, 2005 9:27 pm    Post subject: Reply with quote

Time to hang my head in shame.
I'll try that when I get home...
Back to top
View user's profile Send private message
impact
n00b
n00b


Joined: 02 Mar 2005
Posts: 48

PostPosted: Tue May 17, 2005 12:36 am    Post subject: Reply with quote

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
View user's profile Send private message
impact
n00b
n00b


Joined: 02 Mar 2005
Posts: 48

PostPosted: Tue May 17, 2005 12:45 am    Post subject: Reply with quote

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
View user's profile Send private message
impact
n00b
n00b


Joined: 02 Mar 2005
Posts: 48

PostPosted: Tue May 17, 2005 12:55 am    Post subject: Reply with quote

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
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Tue May 17, 2005 1:32 pm    Post subject: Reply with quote

Here are a couple of threads reguarding a /dev/null permissions problem, you may be missing a dev configuration update:
https://forums.gentoo.org/viewtopic-t-338031-start-0-postdays-0-postorder-asc-highlight-dev+null.html
https://forums.gentoo.org/viewtopic-t-338105-start-0-postdays-0-postorder-asc-highlight-etcupdate.html
Back to top
View user's profile Send private message
impact
n00b
n00b


Joined: 02 Mar 2005
Posts: 48

PostPosted: Tue May 17, 2005 8:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum