Re: narwhal and PGDLLIMPORT - Mailing list pgsql-hackers

From Noah Misch
Subject Re: narwhal and PGDLLIMPORT
Date
Msg-id 20141022041236.GA321275@tornado.leadboat.com
Whole thread Raw
In response to Re: narwhal and PGDLLIMPORT  (Noah Misch <noah@leadboat.com>)
Responses Re: narwhal and PGDLLIMPORT
List pgsql-hackers
On Mon, Oct 20, 2014 at 01:03:31AM -0400, Noah Misch wrote:
> I reproduced narwhal's problem using its toolchain on another 32-bit Windows
> Server 2003 system.  The crash happens at the SHGetFolderPath() call in
> pqGetHomeDirectory().  A program can acquire that function via shfolder.dll or
> via shell32.dll; we've used the former method since commit 889f038, for better
> compatibility[1] with Windows NT 4.0.  On this system, shfolder.dll's version
> loads and unloads shell32.dll.  In PostgreSQL built using this older compiler,
> shfolder.dll:SHGetFolderPath() unloads libpq in addition to unloading shell32!
> That started with commit 846e91e.  I don't expect to understand the mechanism
> behind it, but I recommend we switch back to linking libpq with shell32.dll.
> The MSVC build already does that in all supported branches, and it feels right
> for the MinGW build to follow suit in 9.4+.  Windows versions that lack the
> symbol in shell32.dll are now ancient history.

That allowed narwhal to proceed a bit further than before, but it crashes
later in the dblink test suite.  Will test again...



pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: wal-size limited to 16MB - Performance issue for subsequent backup
Next
From: Heikki Linnakangas
Date:
Subject: Re: wal-size limited to 16MB - Performance issue for subsequent backup