我最近从Maverick升级到Natty,除了dist升级期间PostgreSQL出了点问题之外,其他一切都很好。此后,我尝试通过“ sudo apt-get purge postgresql”重新安装,删除甚至清除它,但是无论我做什么,它仍然会出现相同的错误。见下文。升级之前,它工作正常。任何帮助将不胜感激。谢谢!
Setting up postgresql-common (114) ...
* Starting PostgreSQL 8.4 database server * The PostgreSQL server failed to start. Please check the log output:
2011-05-19 11:49:41 EDT LOG: could not bind IPv4 socket: Address already in use
2011-05-19 11:49:41 EDT HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2011-05-19 11:49:41 EDT WARNING: could not create listen socket for "127.0.0.1"
2011-05-19 11:49:41 EDT FATAL: could not create shared memory segment: Invalid argument
2011-05-19 11:49:41 EDT DETAIL: Failed system call was shmget(key=5432001, size=37879808, 03600).
2011-05-19 11:49:41 EDT 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 37879808 bytes), reduce PostgreSQL's shared_buffers parameter (currently 4096) and/or its max_connections parameter (currently 103).
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.
[fail]
invoke-rc.d: initscript postgresql, action "start" failed.
dpkg: error processing postgresql-common (--configure):
subprocess installed post-installation script returned error exit status 1
您能否发布“ netstat -na | grep 5432”的输出
—
freethinker
运行该命令不会输出任何内容。还有其他想法吗?
—
有线
打开
—
-freethinker
/etc/init.d/postgresql
并set -x
在行后添加a ,#!/bin/bash
然后执行a sudo /etc/init.d/postgresql restart
并发布输出
我用set -x替换了set -e,这就是我得到的:pastebin链接
—
连线