pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christian Ullrich <chris@chrullrich.net>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: pgsql-committers <pgsql-committers@postgresql.org>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: pgsql: Add putenv support for msvcrt from Visual Studio 2013
Date: Tue, 6 Sep 2016 14:21:00 +0200
Message-ID: <b1c08e36-5a8e-cc0a-d49e-a9a571ecfc0a@chrullrich.net> (raw)
In-Reply-To: <CAB7nPqRJBHNMqthtQuU=-0koJdAZyR=BwOQWxPKURr5rUcpnpg@mail.gmail.com>
References: <E1atXIK-0003un-G0@gemulon.postgresql.org>
	<b0c66170-5711-20dd-2de3-408429ca0f48@chrullrich.net>
	<CABUevEzicpYAUOF9ZHkee1-c-gvokKAmr708sqta4H71bOZOWQ@mail.gmail.com>
	<34dd7956-3324-0305-288d-edc7d56fba76@chrullrich.net>
	<571E6D90.7050903@dunslane.net>
	<9d5c6a49-774c-44de-83fc-65c5b431f8d9@chrullrich.net>
	<2c5f9472-d0cc-df61-78e3-bc48909ffb59@chrullrich.net>
	<784524b2-bd50-1f5e-dad9-f8840f97753a@chrullrich.net>
	<CAB7nPqQyNvox10vK1xPvHVsy9NTKJtdbOOHYzLcJiM1DzFtoLg@mail.gmail.com>
	<74d35d99-8816-f58f-5898-338fb290567e@chrullrich.net>
	<CAB7nPqR5vDX4UBXGXqeUGQ5JUHpEg_1fQX7iiSHzNUVRCp-S0Q@mail.gmail.com>
	<16feb1af-7fbb-49ab-8cf8-f98a6e7da9c0@chrullrich.net>
	<CAB7nPqRJBHNMqthtQuU=-0koJdAZyR=BwOQWxPKURr5rUcpnpg@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

* Michael Paquier wrote:

> On Tue, Sep 6, 2016 at 5:36 PM, Christian Ullrich <chris@chrullrich.net> wrote:
>> * Michael Paquier wrote:

>>> In order to avoid any problems with the load and unload windows, my
>>> bet goes for 0001, 0002 and 0003, with the last two patches merged
>>> together, 0001 being only a set of independent fixes. That's ugly, but
>>> that looks the safest course of actions. I have rebased/rewritten the
>>> patches as attached. Thoughts?
>>
>> In lieu of convincing you to drop the entire thing, yes, that looks about
>> right, except for the BOOL thing.
>
> Yes, right. Thanks. Patch 0001 is definitely something that should be
> applied and backpatched, the CloseHandle() call is buggy. Now 0002 and
> 0003 are improving things, but there have been no reports regarding
> problems in this area, so this could just be applied to master I
> guess. Christian, does that sound right?

Yes.

> By the way, how is it decided that a DLL gets unloaded in a process if
> it is not pinned? Is that something the OS decides?

Reference counting in LoadLibrary() and FreeLibrary(), among other 
places. For example, GetModuleHandleEx() (but not the non-Ex) will by 
default increment the counter.

-- 
Christian


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



view thread (30+ messages)  latest in thread

Message-ID: <b1c08e36-5a8e-cc0a-d49e-a9a571ecfc0a@chrullrich.net>
Permalink:  ../b1c08e36-5a8e-cc0a-d49e-a9a571ecfc0a@chrullrich.net/
Also on:    postgresql.org/message-id/b1c08e36-5a8e-cc0a-d49e-a9a571ecfc0a@chrullrich.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: chris@chrullrich.net, michael.paquier@gmail.com, andrew@dunslane.net, magnus@hagander.net, pgsql-hackers@postgresql.org
  Subject: Re: pgsql: Add putenv support for msvcrt from Visual Studio 2013
  In-Reply-To: <b1c08e36-5a8e-cc0a-d49e-a9a571ecfc0a@chrullrich.net>
  References: <E1atXIK-0003un-G0@gemulon.postgresql.org> <b0c66170-5711-20dd-2de3-408429ca0f48@chrullrich.net> <CABUevEzicpYAUOF9ZHkee1-c-gvokKAmr708sqta4H71bOZOWQ@mail.gmail.com> <34dd7956-3324-0305-288d-edc7d56fba76@chrullrich.net> <571E6D90.7050903@dunslane.net> <9d5c6a49-774c-44de-83fc-65c5b431f8d9@chrullrich.net> <2c5f9472-d0cc-df61-78e3-bc48909ffb59@chrullrich.net> <784524b2-bd50-1f5e-dad9-f8840f97753a@chrullrich.net> <CAB7nPqQyNvox10vK1xPvHVsy9NTKJtdbOOHYzLcJiM1DzFtoLg@mail.gmail.com> <74d35d99-8816-f58f-5898-338fb290567e@chrullrich.net> <CAB7nPqR5vDX4UBXGXqeUGQ5JUHpEg_1fQX7iiSHzNUVRCp-S0Q@mail.gmail.com> <16feb1af-7fbb-49ab-8cf8-f98a6e7da9c0@chrullrich.net> <CAB7nPqRJBHNMqthtQuU=-0koJdAZyR=BwOQWxPKURr5rUcpnpg@mail.gmail.com> <b1c08e36-5a8e-cc0a-d49e-a9a571ecfc0a@chrullrich.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox