Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 0EDBB9FB29B for ; Fri, 3 Nov 2006 04:07:26 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 36998-03 for ; Fri, 3 Nov 2006 08:07:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail01.enterprisedb.com (mail01.enterprisedb.com [63.246.7.168]) by postgresql.org (Postfix) with ESMTP id 12DB29FB260 for ; Fri, 3 Nov 2006 04:07:20 -0400 (AST) thread-index: Acb/HxYYdagZ+qruQRSDIJps3Wfprw== Received: from [192.168.0.31] ([82.133.64.220]) by mail01.enterprisedb.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 3 Nov 2006 03:07:20 -0500 Subject: Re: "recovering prepared transaction" after serverrestart message From: "Simon Riggs" To: "Tom Lane" X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2757 Content-class: urn:content-classes:message Importance: normal Cc: , In-Reply-To: <27067.1162536485@sss.pgh.pa.us> References: <27067.1162536485@sss.pgh.pa.us> Content-Type: text/plain; charset="iso-8859-1" Date: Fri, 03 Nov 2006 08:06:55 +0000 Message-ID: <1162541215.3587.507.camel@silverbirch.site> MIME-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 03 Nov 2006 08:07:20.0421 (UTC) FILETIME=[15F6E950:01C6FF1F] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/101 X-Sequence-Number: 93563 On Fri, 2006-11-03 at 01:48 -0500, Tom Lane wrote: > I agree that there's a usability issue here though; I've been burnt by > forgotten prepared xacts myself (eg by control-C'ing pg_regress at just > the wrong time). Would it help if we included prepared xacts in the > pg_stat_activity view? > Is there any other place we could make them > more visible during normal server operation? We only care when they break, otherwise its just situation normal, yes? Is there a way to see prepared transactions where the original session that prepared then has died? Perhaps the message at startup should be "you have at least one prepared transaction that needs resolution". We need something at that point, otherwise a PITR recovery is fairly likely to contain them and we need to know that. Otherwise on a system using prepared transactions heavily you may not spot the odd or two that have crashed and need resolution. Presumably they will effect oldestxmin, so its fairly important to be able to resolve them in a timely manner or at least know they are there. Not that I am advising their use though.... -- Simon Riggs EnterpriseDB http://www.enterprisedb.com