Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XAex2-00049B-PC for pgsql-bugs@arkaria.postgresql.org; Fri, 25 Jul 2014 12:50:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XAex2-0001Uh-4D for pgsql-bugs@arkaria.postgresql.org; Fri, 25 Jul 2014 12:50:20 +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 1XATjm-0007Ix-5j for pgsql-bugs@postgresql.org; Fri, 25 Jul 2014 00:51:54 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XATjj-0008Ll-2i for pgsql-bugs@postgresql.org; Fri, 25 Jul 2014 00:51:52 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1XATji-0004fj-2K for pgsql-bugs@postgresql.org; Thu, 24 Jul 2014 17:51:50 -0700 Date: Thu, 24 Jul 2014 17:51:50 -0700 (PDT) From: enzesheng To: pgsql-bugs@postgresql.org Message-ID: <1406249509455-5812796.post@n5.nabble.com> In-Reply-To: <20140724165415.GH5475@eldon.alvh.no-ip.org> References: <20140723072420.27765.68794@wrigleys.postgresql.org> <27346.1406148531@sss.pgh.pa.us> <20140724165415.GH5475@eldon.alvh.no-ip.org> Subject: Re: BUG #11025: could not access status of transaction 7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 2.2 (++) 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 Sorry, I didn't put the code clearly. I modified the pgstat_heap function, the SnapshotNow is changed to HeapTupleSatisfiesMVCCCMDChkDB which is wrote by me. Stack information and code #0 SimpleLruReadPage (ctl=0x8464c60, pageno=43890, write_ok=1 '\001', xid=1438198033) at slru.c:374 #1 0x080e8e4c in SimpleLruReadPage_ReadOnly (ctl=0x8464c60, pageno=43890, xid=1438198033) at slru.c:494 #2 0x080c7d69 in TransactionIdGetStatus (xid=1, lsn=0xbfb59c7c) at clog.c:184 #3 0x080c7f5f in TransactionLogFetch (transactionId=1438198033) at transam.c:82 #4 0x080c8101 in TransactionIdDidCommit (transactionId=1438198033) at transam.c:172 #5 0x0835997d in HeapTupleSatisfiesMVCCCMDChkDB (tuple=0xb10d6688, snapshot=0x8461740, buffer=128176) at tqual.c:1481 #6 0x0831d689 in pgstat_heap (rel=0x6dbbffe0, fcinfo=0xbfb59f80) at pgstattuple.c:671 #7 0x0831f257 in pgstattuplebyid (fcinfo=0xbfb59f80) at pgstattuple.c:583 pgstat_heap /* Disable syncscan because we assume we scan from block zero upwards */ scan = heap_beginscan_strat(rel, SnapshotAny, 0, NULL, true, false); *nblocks = scan->rs_nblocks; /* # blocks to be scanned */ /* scan the relation */ while ((tuple = heap_getnext(scan, ForwardScanDirection)) != NULL) { /* must hold a buffer lock to call HeapTupleSatisfiesVisibility */ LockBuffer(scan->rs_cbuf, BUFFER_LOCK_SHARE); if (HeapTupleSatisfiesVisibility(tuple, SnapshotNow, scan->rs_cbuf)) { stat.tuple_len += tuple->t_len; stat.tuple_count++; } HeapTupleSatisfiesMVCCCMDChkDB bool HeapTupleSatisfiesMVCCCMDChkDB(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer) { TransactionId xmin = InvalidTransactionId; TransactionId xmax = InvalidTransactionId; bool xminCommit = false; bool xmaxCommit = false; bool xminInvalid = false; bool xmaxInvalid = false; volatile BufferDesc *bufHdr = NULL; xmin = HeapTupleHeaderGetXmin(tuple); xmax = HeapTupleHeaderGetXmax(tuple); if (InvalidTransactionId == xmin) { xminInvalid = true; } else { xminCommit = TransactionIdDidCommit(xmin); } if (InvalidTransactionId == xmax) { xmaxInvalid = true; } else { xmaxCommit = TransactionIdDidCommit(xmax); } -- View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-11025-could-not-access-status-of-transaction-7-tp5812611p5812796.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs