Re: BUG #12469: pg_locks shows locks held by pids not found i n pg_stat_activity or ps

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>, "kop(at)meme(dot)com" <kop(at)meme(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #12469: pg_locks shows locks held by pids not found i n pg_stat_activity or ps
Date: 2015-01-09 18:44:28
Message-ID: 54B0218C.6080808@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2015-01-09 19:07, Kevin Grittner wrote:
> "kop(at)meme(dot)com" <kop(at)meme(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Karl O. Pinc 2015-01-09 19:02:53 Re: BUG #12469: pg_locks shows locks held by pids not found i n pg_stat_activity or ps
Previous Message Kevin Grittner 2015-01-09 18:38:36 Re: BUG #12469: pg_locks shows locks held by pids not found i n pg_stat_activity or ps