Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Starting Postgres 7.4 (-r1 ebuild)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
yodermk
Apprentice
Apprentice


Joined: 09 Jun 2003
Posts: 189
Location: Quito, Ecuador

PostPosted: Wed Dec 10, 2003 3:49 am    Post subject: Starting Postgres 7.4 (-r1 ebuild) Reply with quote

OK, I did something stupid...instead of shutting down 7.3 gracefully I kill -9'd the postmaster and deleted the data directory before upgrading (after a pg_dumpall).

Now it starts and stops fine with the pg_ctl script, but if I start with the normal init script, it just says:

Code:
nova root # /etc/init.d/postgresql start
 * WARNING:  "postgresql" has already been started.


It's definitely not running. The log file says:

Code:
LOG:  could not create IPv6 socket: Address family not supported by protocol
FATAL:  could not create shared memory segment: Invalid argument
DETAIL:  Failed system call was shmget(key=5432001, size=34037760, 03600).
HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter.  You can either reduce the request size or reconfigure the kernel with larger SHMMAX.  To reduce the request size (currently 34037760 bytes), reduce PostgreSQL's shared_buffers parameter (currently 2048) and/or its max_connections parameter (currently 1024).
   If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
   The PostgreSQL documentation contains more information about shared memory configuration.


The conf.d/postgres file has not changed.

Is there a lock file other than the normal pid file that I need to delete to make Gentoo know it's not running? Or is something else messed up?

Thanks...
Back to top
View user's profile Send private message
percking
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2003
Posts: 90

PostPosted: Wed Dec 10, 2003 6:26 am    Post subject: Reply with quote

try a zap... it's a feature of most rc-scripts
so something like
Code:
/etc/init.d/postgres zap

read the man pages to know exactly what it does...


mark


Last edited by percking on Fri Jan 03, 2020 12:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
yodermk
Apprentice
Apprentice


Joined: 09 Jun 2003
Posts: 189
Location: Quito, Ecuador

PostPosted: Wed Dec 10, 2003 6:55 am    Post subject: Reply with quote

Hmm, thanks, I now remember seeing the zap command before. After doing that, it still doesn't start with the init script though. :(

Well, the difference is that it SAYS it starts (unlike before), but it still isn't running. :( Still get the same stuff in the log.

By looking at the script, it looks like it is doing exactly what I was doing manually with pg_ctl. Huh.
Back to top
View user's profile Send private message
ruut_
n00b
n00b


Joined: 04 Feb 2004
Posts: 2

PostPosted: Wed Feb 04, 2004 9:00 am    Post subject: Reply with quote

I had the same problem until I reduced the max_connections parameter from 1024 to 128. It makes no difference for me because I only use Postgresql for local development.

Just modify the file /etc/conf.d/postgresql and change the line

PGOPTS="-N 1024 -B 2048 -i"

to

PGOPTS="-N 128 -B 2048 -i"

Hope that helps!
Back to top
View user's profile Send private message
sheepdog
Guru
Guru


Joined: 14 Oct 2002
Posts: 369
Location: Edison Enterprises Inc., Lake Oswego, Oregon, USA

PostPosted: Mon Feb 09, 2004 10:24 pm    Post subject: netstat Reply with quote

On our system we experienced the same problem. rc-update zap allowed the postmaster to try to start the server but fail. The log file indicated it could not get access to the 5432 socket. netstat -l revealed that there was supposed to be a file /tmp/.s.PG5432 listening on the socket, however this file had previously been removed. Rebooting the system (probably a better way of refreshing the network information, but I'm not sure how) solved the problem.
Back to top
View user's profile Send private message
matiu
n00b
n00b


Joined: 02 May 2004
Posts: 1

PostPosted: Sun May 02, 2004 8:57 pm    Post subject: Reply with quote

I also had the same prob. Took me every other weekend for two months to find it in /etc/conf.d.

I edited the /var/lib/postgresql/data/postgresql.conf and it didn't respond to any changes I made. I thought, it must be loading the config file from another dir.

Code:
postmaster -D /var/lib/postgresql/data


worked fine.

I did a locate for postgresql.conf. No others around. So I looked at /etc/init.d/postgresql

It had all these options and things in it, so I tried setting them in the script it self at the top, but no response!

I asked on IRC several times, some people tried to help but they were stuck too in #gentoo and #postgres (#postgres people are far more friendlier and helpful than #gentoo, maybe because #gentoo is so busy, perhaps it should be split into sub channels?)

Anyway I asked twice in #gentoo,
Quote:
Where can I find info about setting options in /etc/init.d files?
No response, (a lot like the /etc/init.d ;)

Eventually I did a
Code:
find /etc | xargs grep PGOPTS
and found it in the /etc/conf.d

Maybe this should be reported as a bug in the ebuild?

BTW: I still like gentoo, its just sometimes a bit frustrating. Maybe I need more patience :?
Back to top
View user's profile Send private message
yodermk
Apprentice
Apprentice


Joined: 09 Jun 2003
Posts: 189
Location: Quito, Ecuador

PostPosted: Sat May 08, 2004 10:04 pm    Post subject: Reply with quote

Just as an update to this, a good summary is that it is not seeing some of the parameters in the postgresql.conf file because of the PGOPTS variable in the /etc/conf.d/postgresql file.

If you comment out that line, it will read the parameters from the pg.conf file, which I think is a little less confusing.

That's what I did, and I'd recommend that the Gentoo developers follow suit in the ebuild. But that's just my opinion. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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