Re: [HACKERS] Latches API on windows - Mailing list pgsql-hackers

From Abbas Butt
Subject Re: [HACKERS] Latches API on windows
Date
Msg-id CALtH27fiDyWWBQXmtf29GFNASwrmiHpofRxWq9mCTZ0_w8be1w@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Latches API on windows  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Thanks for the suggestion.


On Mon, Oct 9, 2017 at 6:56 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Craig Ringer <craig@2ndquadrant.com> writes:
> On 9 October 2017 at 21:26, Abbas Butt <abbas.butt@enterprisedb.com> wrote:
>> In my case this is not true, I am calling InitSharedLatch in _PG_init
>> which gets called at CREATE EXTENSION time.
>> My question : Is there a way to get the latches API work on windows
>> the way it is working on Linux?

> I suspect you'd need to do it by having your extension load via
> shared_preload_libraries, registering its latch in shmem_startup_hook

Yeah.  That would also let you request your shared memory area honestly,
instead of relying on there being some slop in the initial allocation.

                        regards, tom lane



--
--
Abbas
Architect
Skype ID: gabbasb
www.enterprisedb.com

Follow us on Twitter

@EnterpriseDB

Visit EnterpriseDB for tutorials, webinars, whitepapers and more

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Latches API on windows
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] Latches API on windows