Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WxUxf-00019p-2r for pgsql-bugs@arkaria.postgresql.org; Thu, 19 Jun 2014 05:32:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WxUxe-0006Ao-Jh for pgsql-bugs@arkaria.postgresql.org; Thu, 19 Jun 2014 05:32:34 +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 1WxUxe-0006Ai-0X for pgsql-bugs@postgresql.org; Thu, 19 Jun 2014 05:32:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WxUxa-0006Be-Ms for pgsql-bugs@postgresql.org; Thu, 19 Jun 2014 05:32:33 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s5J5WKCW015645; Thu, 19 Jun 2014 01:32:20 -0400 From: Tom Lane To: Sean Rhea cc: pgsql-bugs@postgresql.org Subject: Re: LISTEN fails to "access status of transaction" In-reply-to: References: Comments: In-reply-to Sean Rhea message dated "Wed, 18 Jun 2014 16:47:03 -0700" Date: Thu, 19 Jun 2014 01:32:20 -0400 Message-ID: <15644.1403155940@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Sean Rhea writes: > We think we're running into a bug in the pg_notify code. > We've only seen this bug twice. We can't reproduce it at will, but once it > starts happening it's 100% reproducible until we implement the workaround > as described below. Hopefully the information here is enough for you to > work with, and if not, we understand. > The symptom we see is that any client attempting to call "LISTEN name>;" receives an error like this one: > ERROR: could not access status of transaction 3767760004 > DETAIL: Could not open file "pg_clog/0E09": No such file or directory. Hm. This appears to indicate that there's a sending-transaction XID in the notify queue that's so old that the corresponding clog entry has been recycled. I don't think there's any direct interlock between the notify queue contents and the clog recycling mechanisms; but we don't recycle clog until a VACUUM FREEZE has frozen all older tuples, and normally that's hundreds of millions of transactions in the past. So I wonder if you (a) are aggressively forcing freezing, and/or (b) have some listening session that has been idle-in-transaction for, um, a very long time. Even if you do, it's not quite clear how we could have advanced the freeze horizon far enough to allow this problem to occur: I'd have thought that such an open transaction would also block freezing. But there's clearly *something* you're doing that's outside the norm. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs