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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: REPOST: InitDB Failure on install


  • From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
  • To: "Andreas Pflug" <pgadmin(at)pse-consulting(dot)de>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • Cc: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>, <pgsql-hackers-win32(at)postgresql(dot)org>
  • Subject: Re: REPOST: InitDB Failure on install
  • Date: Tue, 24 Aug 2004 10:19:55 +0200
  • Message-id: <6BCB9D8A16AC4241919521715F4D8BCE34C072(at)algol(dot)sollentuna(dot)se>

> > "Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
> > 
> >>                /* Unable to get shared memory */
> >>+               errno = GetLastError();
> > 
> > 
> > Aren't you going to need a mapping function to convert 
> Windows error 
> > codes to errno numbers?  Don't tell me Microsoft was smart 
> enough to 
> > make them the same ;-)
> 
> How about the idea to set errno to a special value after all 
> non-posix calls, which makes ereport examine/preserve 
> GetLastError() instead?

We could do this, but that means we need to hack the whole error stack
handlign etc to save the value of GetLastError() as well as errno. But
yeah, we could do that.

Not sure if we need to do it after all calls though - probably enough to
do it only after the ones where there is actually a ereport() call with
%m nearby (or when we're emulating a unix function such as in shmget()).

Tom - which method do you think is best to go with?

//Magnus




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group