Re: 8.2.3: Server crashes on Windows using Eclipse/Junit - Mailing list pgsql-general

From Dave Page
Subject Re: 8.2.3: Server crashes on Windows using Eclipse/Junit
Date
Msg-id 471E0FC6.5080909@postgresql.org
Whole thread Raw
In response to Re: 8.2.3: Server crashes on Windows using Eclipse/Junit  (Rainer Bauer <usenet@munnin.com>)
Responses Re: 8.2.3: Server crashes on Windows using Eclipse/Junit  ("Harald Armin Massa" <haraldarminmassa@gmail.com>)
List pgsql-general
Rainer Bauer wrote:
>> ...yep, under XP I'm using about 3.1KB of the service heap per
>> connection, which tears through it quite a bit faster.  Now to figure
>> out exactly where it's coming from...
>
> I can confirm this here (WinXP SP2).

It's coming from direct dependencies on user32.dll (from which we use
wsprintf()) and shell32.dll (from which we use SHGetSpecialFolderPath())
and is allocated when ResumeThread() is called to kickstart the new
backend, but before the backend actually does anything (proven with a
while(1) loop in main() for the -forkbackend case with a breakpoint on
ResumeThread() in the postmaster).

I've submitted a patch against 8.3 that removes these dependencies
altogether. Unfortuntely, it seems we still have indirect dependencies
on user32.dll which I don't believe we can do anything about. In
testing, the patch reduces the per-connection desktop heap usage from
arount 9.7KB to 3.2KB which is back in line with 8.2.

Regards, Dave

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: autovacuum and locks
Next
From: Alvaro Herrera
Date:
Subject: Re: autovacuum and locks