View previous topic :: View next topic |
Author |
Message |
yodermk Apprentice
Joined: 09 Jun 2003 Posts: 189 Location: Quito, Ecuador
|
Posted: Wed Dec 10, 2003 3:49 am Post subject: Starting Postgres 7.4 (-r1 ebuild) |
|
|
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 |
|
|
percking Tux's lil' helper
Joined: 03 Jul 2003 Posts: 90
|
Posted: Wed Dec 10, 2003 6:26 am Post subject: |
|
|
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 |
|
|
yodermk Apprentice
Joined: 09 Jun 2003 Posts: 189 Location: Quito, Ecuador
|
Posted: Wed Dec 10, 2003 6:55 am Post subject: |
|
|
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 |
|
|
ruut_ n00b
Joined: 04 Feb 2004 Posts: 2
|
Posted: Wed Feb 04, 2004 9:00 am Post subject: |
|
|
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 |
|
|
sheepdog Guru
Joined: 14 Oct 2002 Posts: 369 Location: Edison Enterprises Inc., Lake Oswego, Oregon, USA
|
Posted: Mon Feb 09, 2004 10:24 pm Post subject: netstat |
|
|
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 |
|
|
matiu n00b
Joined: 02 May 2004 Posts: 1
|
Posted: Sun May 02, 2004 8:57 pm Post subject: |
|
|
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 |
|
|
yodermk Apprentice
Joined: 09 Jun 2003 Posts: 189 Location: Quito, Ecuador
|
Posted: Sat May 08, 2004 10:04 pm Post subject: |
|
|
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 |
|
|
|