J.T.,
> I am running Debian stable with postgresql 7.2.1. My machine has 4 GB of
> RAM and I have configured the kernel to recognize it all. I have the
> following shared mem options set:
First off, if there is a deb package for 7.2.3 or 7.2.4, you should upgrade.
7.2.1 contains several notable bugs.
> Based on what I read in the docs I should be able to use at
> setting of shared_buffers = 454000 in my postgresql.conf file as I want
> to use about 3600MB of memory for my database.
No, you don't.
If you survey the archives of the PGSQL-PERFORMANCE list, you will find lots
of anecdotal evidence that any shared buffer setting beyond 2000-6000
actually decreases performance or at least does not benefit it. Shared
buffers are just a "holding area" while data is being fed to the Kernel
buffer; beyond a certain size, they in fact rob the kernel of resources.
(BTW, you are not a dummy for not knowing this; it is poorly documented if at
all in current docs. We'll fix that in the future, really!)
> However when I try to use that many segments I get the following error:
>
> IpcMemoryCreate: shmat(id=1015811) failed: Invalid argument
>
> The highest number of shared buffers it allows me to use is 258169. After
> starting postgresql with the shared_buffers = 258169 and
> max_connections = 64 ipcs shows the following:
That's because, I believe, that shared_buffers is a 4-byte integer that won't
address more than 2.4 billion bytes. Since settings > 6000 are generally
viewed as counterproductive, this is not widely viewed as a bug.
--
-Josh Berkus
Aglio Database Solutions
San Francisco