On Mon, 23 Jul 2018 at 16:45, Michael Paquier <mich...@paquier.xyz> wrote:

> On Mon, Jul 23, 2018 at 08:16:52AM +0000, Tsunakawa, Takayuki wrote:
> > I guess that is due to some missing files related to the libraries
> > listed in shared_preload_library.  If so, no, because this patch
> > relates to failure before main().
>
> No, I really mean a library dependency failure.  For example, imagine
> that Postgres is compiled on Windows dynamically, and that it depends on
> libxml2.dll, which is itself compiled dynamically.  Then imagine, in a
> custom build echosystem, that a folk comes in and adds lz support to
> libxml2 on Windows.  If Postgres still consumes libxml2 but does not add
> in its PATH a version of lz, then a backend in need of libxml2 would
> fail to load, causing Postgres to not start properly.  True, painful,
> story.
>

What's super fun about this is the error message. Guess which error Windows
will emit? (Some paraphrasing for exact wording):

* "There was a problem starting C:\Program
Files\PostgreSQL\11\bin\postgres.exe: The specified module could not be
found."

* "There was a problem starting C:\Program
Files\PostgreSQL\11\bin\postgres.exe: module "libxml2.dll" could not be
found."

* "The program can't start because "libxml2.dll" is missing from your
computer."

* "The program "C:\Program Files\PostgreSQL\11\bin\postgres.exe" can't
start because an error was encountered when loading required library
"C:\Program Files\PostgreSQL\11\lib\libxml.dll": libxml.dll requires
"liblz.dll" but it could not be found."

Hint: not the last one.

It'll at best complain about libxml.dll being missing, despite it being
very obviously present.

I had to go hunt around with Dependency Walker to figure out the actual
missing DLL the last time I had to deal with this.

-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Reply via email to