Re: [PATCHES] POSIX shared memory support

2007-03-24 Thread Bruce Momjian
Newest version added: Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews and approves it.

Re: [PATCHES] POSIX shared memory support

2007-03-04 Thread Chris Marcellino
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

Re: [PATCHES] POSIX shared memory support

2007-03-03 Thread Joshua D. Drake
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

Re: [PATCHES] POSIX shared memory support

2007-02-27 Thread Magnus Hagander
On Mon, Feb 26, 2007 at 09:00:09PM -0800, Chris Marcellino wrote: There is also a Windows version of this patch included, which can replace the current SysV-to-Win32 shared memory layer as it currently does not check for orphaned backends in the database. If this is used,

Re: [PATCHES] POSIX shared memory support

2007-02-27 Thread Chris Marcellino
The Win32 version didn't materialize until very recently. The Win32 calls are similar semantically to the POSIX ones, so it was somewhat straightforward. Plaintext is nice if you can fit it, since Windows permits you to have slashes and all sorts of other non-filename characters in them,

Re: [PATCHES] POSIX shared memory support

2007-02-27 Thread Magnus Hagander
On Tue, Feb 27, 2007 at 01:09:46AM -0800, Chris Marcellino wrote: The Win32 version didn't materialize until very recently. The Win32 calls are similar semantically to the POSIX ones, so it was somewhat straightforward. Plaintext is nice if you can fit it, since Windows permits you to

Re: [PATCHES] POSIX shared memory support

2007-02-27 Thread Magnus Hagander
On Tue, Feb 27, 2007 at 10:30:15AM +0100, Magnus Hagander wrote: Does Windows have a method to get a unique ID number for a given data directory, or a token file in that directory? It would need to be constant while the database is open. Perhaps GetFileInformationByHandle? It returns

Re: [PATCHES] POSIX shared memory support

2007-02-27 Thread Chris Marcellino
I believe that all we need is the ID to be constant and unique while the postmaster or its associated backends are running. If anything from a given generation has the database open, it will remain constant before any new process can connect to it successfully. Would it be feasible to

Re: [PATCHES] POSIX shared memory support

2007-02-26 Thread Tom Lane
Chris Marcellino [EMAIL PROTECTED] writes: The System V shared memory facilities provide a method to determine who is attached to a shared memory segment. This is used to prevent backends that were orphaned by crashed or killed database processes from corrupting the data- base as it is

Re: [PATCHES] POSIX shared memory support

2007-02-26 Thread Chris Marcellino
On Feb 26, 2007, at 10:43 PM, Tom Lane wrote: Chris Marcellino [EMAIL PROTECTED] writes: The System V shared memory facilities provide a method to determine who is attached to a shared memory segment. This is used to prevent backends that were orphaned by crashed or killed database processes