Re: POSIX shared memory support

From: Chris Marcellino <cmarcellino(at)apple(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: POSIX shared memory support
Date: 2007-03-05 02:51:29
Message-ID: 3F2BEE0B-ED00-42A7-B978-3AC9E97A86A8@apple.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

AFAIK, the only systems supported by Postgres that this patch won't
work on are NetBSD and OpenBSD.

The POSIX calls free the user from the SHMMAX and SHMALL limitations
of the SysV shared memory calls on platforms that support it. Since
this still takes one SysV segment, SHMMNI can still be reached on
some platforms if a ton of databases are opened simultaneously (i.e.
256 on Linux and Solaris, 100 on SCO Unix, 512 on HP-UX, 32 on Mac OS
X, unlimited on FreeBSD). This is the case without the patch anyhow.

Chris Marcellino

On Mar 3, 2007, at 9:09 AM, Joshua D. Drake wrote:

>
>> If you have the need to ship a product with Postgres embedded in
>> it and
>> are unable to change kernel settings (like myself), this might be
>> of use
>> to you. I have tested all of the failure situations I could think
>> of by
>> various combinations of deleting lockfiles while in use, changing the
>> PID inside the lockfile and trying to restart and run more than one
>> postmaster simultaneously.
>>
>> Of course, this since this requires both POSIX and SysV shared
>> memory,
>> this doesn't increase the portability of Postgres which might make it
>> less appropriate for mass distribution; I thought I would put it out
>> there for any feedback either way.
>
> Well that depends, what systems don't use (or have) POSIX shared
> memory?
> This sounds very interesting to me. Oddly enough I went to do some
> digging on what various differences and I came up with:
>
> http://www.nabble.com/POSIX-shared-memory-support-t3298386.html
>
> Which happens to be you ;)
>
> Sincerely,
>
> Joshua D. Drake
>
>
>
>>
>> Thanks again,
>> Chris Marcellino
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> ---
>>
>>
>> ---------------------------(end of
>> broadcast)---------------------------
>> TIP 2: Don't 'kill -9' the postmaster
>
>
> --
>
> === The PostgreSQL Company: Command Prompt, Inc. ===
> Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
> Providing the most comprehensive PostgreSQL solutions since 1997
> http://www.commandprompt.com/
>
> Donate to the PostgreSQL Project: http://www.postgresql.org/about/
> donate
> PostgreSQL Replication: http://www.commandprompt.com/products/
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: explain analyze is your friend

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message ITAGAKI Takahiro 2007-03-05 04:10:03 Automatic adjustment of bgwriter_lru_maxpages (was: Dead Space Map version 2)
Previous Message Nikolay Samokhvalov 2007-03-05 01:20:45 Re: xpath_array with namespaces support