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