Re: BUG #12469: pg_locks shows locks held by pids not found i n pg_stat_activity or ps - Mailing list pgsql-bugs

From Marko Tiikkaja
Subject Re: BUG #12469: pg_locks shows locks held by pids not found i n pg_stat_activity or ps
Date
Msg-id 54B0218C.6080808@joh.to
Whole thread Raw
In response to Re: BUG #12469: pg_locks shows locks held by pids not found i n pg_stat_activity or ps  (Kevin Grittner <kgrittn@ymail.com>)
Responses Re: BUG #12469: pg_locks shows locks held by pids not found i n pg_stat_activity or ps  (Kevin Grittner <kgrittn@ymail.com>)
List pgsql-bugs
On 2015-01-09 19:07, Kevin Grittner wrote:
> "kop@meme.com" <kop@meme.com> wrote:
>> I found that after running a large transaction (for days, it's still
>> running) and then running out of shared memory that pg_locks reports locks
>> held by pids that do not seem to exist, either in ps output or in
>> pg_stat_activity.
>
> That is not a bug.

I find that really surprising.  What if the pid gets reused and you have
entries in pg_locks with the pid that aren't actually held by that
backend?  That's enough to drive anyone having to debug that mess insane.

Can we not clear the pids or something, at least at backend exit?


.marko

pgsql-bugs by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: BUG #12469: pg_locks shows locks held by pids not found i n pg_stat_activity or ps
Next
From: "Karl O. Pinc"
Date:
Subject: Re: BUG #12469: pg_locks shows locks held by pids not found i n pg_stat_activity or ps