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

From Karl O. Pinc
Subject Re: BUG #12469: pg_locks shows locks held by pids not found i n pg_stat_activity or ps
Date
Msg-id 20150109123146.600a392c@slate.meme.com
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 Fri, 9 Jan 2015 18:07:35 +0000 (UTC)
Kevin Grittner <kgrittn@ymail.com> 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.  For details see either of the below links:
>
> http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/storage/lmgr/README-SSI;hb=master
>
> http://vldb.org/pvldb/vol5/p1850_danrkports_vldb2012.pdf
>
> The short explanation is that SIReadLocks on a serializable
> transaction may need to be kept until overlapping transactions
> terminate.

Ok.  Thanks.

The transactions/locks are in separate databases.  I would think
that in most cases that a
transaction in one database cannot have any effect on a
transaction in another database.

It would be nice if pg were clever enough to isolate transactions
within databases.

Regards,

Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #9923: "reassign owned" does not change permissions grantor
Next
From: Kevin Grittner
Date:
Subject: Re: BUG #12469: pg_locks shows locks held by pids not found i n pg_stat_activity or ps