Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y9eY6-0007ZG-S9 for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Jan 2015 18:44:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y9eY6-0000ZY-9r for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Jan 2015 18:44:42 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y9eY5-0000ZR-9s for pgsql-bugs@postgresql.org; Fri, 09 Jan 2015 18:44:41 +0000 Received: from mail-la0-f48.google.com ([209.85.215.48]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Y9eXx-00063i-9z for pgsql-bugs@postgresql.org; Fri, 09 Jan 2015 18:44:39 +0000 Received: by mail-la0-f48.google.com with SMTP id gf13so15880239lab.7 for ; Fri, 09 Jan 2015 10:44:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=QcuvPSy5R94JDx9vjGfOinb9IJBH6+RIq+lrOI473bA=; b=HunBJRqZlEykOm6tT2wlpIL3cowg39ZND3uLhHQ+E4m+9MEqm9xp+A+vk39mpTE8ul zrCOVBNTlUk/+3JJfy7Uj2BaC2SOo9erQ0ZlAhbQbKbtIqn1y+GhRoyKaea6T7K87gFk QxKHwWIiUkSqpR3KU+4L+/67ISgye5euG/tZBJrKeb0Xz5mBEJzA6Rnlvxzg9LAijLpZ 6zWqOGaTp2LoSDAMCSJRKtyuR4Bhwi5xJ40ZsvxGHmOtDssSlS1aGiut6e7nwJX+1xSv Zdn3O7UTWV0RuJgIWbbapK66KHrwgwxK8bIh3KT3X3GqDXHr561OsfEkuhCPJQrggw/M 1m6g== X-Gm-Message-State: ALoCoQlu9ND2Z1eo1yHJH2QaXLUmFXDjytbt0OcFY8Ruww5Gp524KWqhSnHNv1wwF4NLgUXbZKZS X-Received: by 10.112.170.69 with SMTP id ak5mr23372523lbc.71.1420829070960; Fri, 09 Jan 2015 10:44:30 -0800 (PST) Received: from [172.20.10.2] (c-5eeaaaa7-74736162.cust.telenor.se. [94.234.170.167]) by mx.google.com with ESMTPSA id 10sm2034339lar.24.2015.01.09.10.44.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Jan 2015 10:44:30 -0800 (PST) Message-ID: <54B0218C.6080808@joh.to> Date: Fri, 09 Jan 2015 19:44:28 +0100 From: Marko Tiikkaja User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Kevin Grittner , "kop@meme.com" , "pgsql-bugs@postgresql.org" Subject: Re: BUG #12469: pg_locks shows locks held by pids not found i n pg_stat_activity or ps References: <20150109173951.2583.26210@wrigleys.postgresql.org> <1511260135.4208486.1420826855952.JavaMail.yahoo@jws10056.mail.ne1.yahoo.com> In-Reply-To: <1511260135.4208486.1420826855952.JavaMail.yahoo@jws10056.mail.ne1.yahoo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2015-01-09 19:07, Kevin Grittner wrote: > "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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs