Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y9dyM-0006I4-96 for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Jan 2015 18:07:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y9dyL-0003Qm-MP for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Jan 2015 18:07:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y9dyK-0003Qf-OT for pgsql-bugs@postgresql.org; Fri, 09 Jan 2015 18:07:44 +0000 Received: from nm15-vm2.bullet.mail.ne1.yahoo.com ([98.138.91.91]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Y9dyG-0003aK-3V for pgsql-bugs@postgresql.org; Fri, 09 Jan 2015 18:07:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s2048; t=1420826857; bh=L3H1RXG9eTffmzstUaW7LxVW3vpwuFsQMXO4Db5o3qE=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=VCmHabc1o/1W8pNdX7TSVQoKljEZLoqJNjDdPkOI/WF94Hawh6DNSmxpilooLwLP6Qy1nRpWgTKe6ua+MIab/HvdNBndi9fPRliNfwsTdr7M6Y0KqQ2A/TJN2dXttX9qVXcViUWtbWiVV//f4vCBX7/K9ej6X3HSvSAEIv5NgLehj+Qw6GUQx2dKCbWu3ywUgsEqY4B125Flv+z/2QLwTcRGHi9znNkJnKYk66MxEsJTLSEioSYnjYjBy1edsGZgad4IIzNX6CygYKQoeacZaOWM9eYmlTYNbsAkNGptxo6L3vnZT1zovPEmHytI93fvDd3JQhD/pVvroEjmKn4OZw== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=ymail.com; b=p3p3bRZb/qJQ6ilJLLPcRRoXJfI0G0ctsnxZ8g5xr/6xOY9aoIVc2dKdCYrf9lAG7nmu+OcwbFOIsqAO+NWBiXnNYcjO1aAsZtn4/Z5iozaLFt/eBN75+3sR9rwDsUcr6qkXw/gor7+5B0GFT5R7TOUO6bxyW0oZiqmnnc/ikBrr0medyICs61ckd8fnJrc/vUIHwfLnTQA7b4XhuvpwMFIzehbhYh8sujYoarTvDJ78sNUz5PeVEGoeedcT41te88o5zBNmlIUMQNq7+43LasqBcn1/o00KCR36f/qnFMIUIttya6TDqzPY4w7Ql/Pe2bjEsGnKXtlR48tAWLdaJg==; Received: from [98.138.226.178] by nm15.bullet.mail.ne1.yahoo.com with NNFMP; 09 Jan 2015 18:07:37 -0000 Received: from [98.138.226.169] by tm13.bullet.mail.ne1.yahoo.com with NNFMP; 09 Jan 2015 18:07:37 -0000 Received: from [127.0.0.1] by omp1070.mail.ne1.yahoo.com with NNFMP; 09 Jan 2015 18:07:37 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 285388.7307.bm@omp1070.mail.ne1.yahoo.com X-YMail-OSG: LBBsexQVM1nsRNYSBuGsTyUuQhUr4TwvHd.wcxDS_JVlNx29O9t3QzjE5.1dHal N5BW88da4xH7QedlEoTy4HcPNdAAc4BugxMIddXF7xyBmX85KccLYo17GJkTVAPHlCcTH.FgwSU_ nFUEPD59pqSp51.g2toUaZYqgGAe5VpprIwrLok5cujfY6FvG1sS01rmTJm4DUZuT0hyf4ti5PGw dmoglkn6OpAMIbkBgL2NQksN2w7f5M2ATD6UlZFCVYpMW_1SJszupv4NDCuz9fyxsEwkQq1xt7b. NYt1F1vF7yj3XUt9JnalzzDQOJm7yFYljWOXugnejQuVWWwSmHkpABQ3osNTwf.tqSrFi5lyH2KI 7TGN41RZlKR45qnlFA5SiwJaF0bVIFSRpZuXmytZNs7iDC6E0U4ACU7JZElvsW_hz82ucORpB7k6 NRHQQJdHOUZiM8Ue4irat1RetQscL4DuCD_03KZbPxi7HlDxtudA1OKkblwgn6gK9Cbs0yPQOjMa YjVSfmxv6NgTMEFWjt9Sq9O.jSYZqZEtNnMSYLJSRrS53Q.pPe6IbWT_HWv8WaJLKQRX6fka4ark C7xgoXhnariiqfgicvSum0dkW7GUgqZqUnrSxCSGFZiz8Ti5p0HQi15EI0yrGafq9hOwVTgIC9uS 8VmEFRNnWNcSuy_3_6L1yrMRzeXnvlOgUzIrL_pjLEuFoYMrhSFq8SCm5e2YvkTAqlPdhgPcBxdS BF_Urw78w9sOhQFOfbW7IV90G8ByWubL6XBoiKIIWUBvxclZ0ovseZYVrW2onZd5Va_jdQMemJrI 0TKzQLq8dLOmahw-- Received: by 98.138.105.220; Fri, 09 Jan 2015 18:07:36 +0000 Date: Fri, 9 Jan 2015 18:07:35 +0000 (UTC) From: Kevin Grittner Reply-To: Kevin Grittner To: "kop@meme.com" , "pgsql-bugs@postgresql.org" Message-ID: <1511260135.4208486.1420826855952.JavaMail.yahoo@jws10056.mail.ne1.yahoo.com> In-Reply-To: <20150109173951.2583.26210@wrigleys.postgresql.org> References: <20150109173951.2583.26210@wrigleys.postgresql.org> Subject: Re: BUG #12469: pg_locks shows locks held by pids not found i n pg_stat_activity or ps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Length: 930 X-Pg-Spam-Score: -0.3 (/) 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 "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. You can minimize this by flagging transactions which will not modify data as READ ONLY. If a READ ONLY transaction is expected to run for a very long time, it is wise to also flag it as DEFERRABLE. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs