Skip site navigation (1) Skip section navigation (2)

Re: Win32 signals & sockets

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "PostgreSQL Patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Win32 signals & sockets
Date: 2004-11-15 19:34:35
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE476166@algol.sollentuna.se (view raw or flat)
Thread:
Lists: pgsql-patches
This patch *replaces* the previous one. Contains the exact same changes,
except it *also* contains the move of the backend parameter file to
shared memory on win32.

This gives a speed boost of about 10% on a program that calls
PQconnect/PQfinish in a tight loop on 10 parallell threads on my system
(client and server both on the same machine, desktop system). 

I figured this was the most important thing to get in for now :-) I
still plan to do the cleanups of the forkexec code later.

//Magnus


>-----Original Message-----
>From: Magnus Hagander 
>Sent: den 12 november 2004 22:21
>To: PostgreSQL Patches
>Subject: [PATCHES] Win32 signals & sockets
>
>
>Finally, here is the patch:
>
>* Create the signal pipe in the postmaster and then inherit it into the
>child
>* Duplicate sockets using WSADuplicateSocket/WSASocket to get around
>buggy LSP implementations. From my testing this does not solve *all*
>problems, but it does solve a lot of them.
>* Change pgstat so it signals the collector when the bufferer
>terminates. Because some LSPs are still broken and process termination
>just won't work when the pipe goes away.
>* Clean up handling of the backend parameter file some. There was no
>error checking at all in large parts of it before, which bit me during
>testing, so I figured I might as well take a stab at that. 
>This moves it
>all into a structure and writes that one - which is also 
>preparation for
>the move of the parameter structure away from a file and into shared
>memory.
>
>
>If this is accepted I also plan to do a patch to split out the forkexec
>code into a separate file and try to clean up the dependencies a bit
>further. It'd be nice if I could get that into 8.0.0 (which would
>probably mean this beta, since it seems to be the last one), but it's
>not critical.
>I'd also like to take a look at moving the parameter file into shared
>memory at least on win32, since it gives thefilesystem quite a bit of
>trashing. I think that can be done pretty easily, but I'm not sure if
>there'll be tinme for that in 8.0.0 either.
>
>//Magnus
>
>

Attachment: forkexec2.patch
Description: application/octet-stream (34.7 KB)

Responses

pgsql-patches by date

Next:From: John HansenDate: 2004-11-16 04:13:52
Subject: Unicode characters above 0x10000 #2
Previous:From: Tom LaneDate: 2004-11-15 16:54:56
Subject: libpq and psql not on same page about SIGPIPE

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group