Re: [HACKERS] Group clear xid can leak semaphore count - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] Group clear xid can leak semaphore count
Date
Msg-id CA+TgmoYfJ6td1=Brd3m+HPme0XAQ=YHrryO5J6xm2TOOSUAP6A@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Group clear xid can leak semaphore count  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Jan 5, 2017 at 4:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> I think we have run into this kind of issue before.  I wonder if
>> there's any way to insert some kind of a guard - e.g. detect at
>> backend startup time that the semaphore has a non-zero value and fix
>> it, issuing a warning along the way...  maybe something like:
>
> See the PGSemaphoreReset near the end of InitProcess.

Oh ho.  So the worst consequence of this is a backend-lifetime leak,
not a cluster-lifetime leak.  That's good, at least.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Michael Banck
Date:
Subject: Re: [HACKERS] Replication/backup defaults
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.