X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 131953B4D14 for ; Wed, 15 Dec 2004 19:43:55 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 92573-01 for ; Wed, 15 Dec 2004 19:43:50 +0000 (GMT) Received: from stark.xeocode.com (gsstark.mtl.istop.com [66.11.160.162]) by svr1.postgresql.org (Postfix) with ESMTP id 1160E3B4CFF for ; Wed, 15 Dec 2004 19:43:48 +0000 (GMT) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1Cef3m-0005Nt-00; Wed, 15 Dec 2004 14:43:42 -0500 To: Jan Wieck Cc: =?iso-8859-1?q?Jens_Lechtenb=F6rger?= , pgsql-interfaces@postgresql.org Subject: Re: Lost updates vs resumable connections/transactions References: <41C06961.8020406@Yahoo.com> In-Reply-To: <41C06961.8020406@Yahoo.com> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 15 Dec 2004 14:43:41 -0500 Message-ID: <87is73qrde.fsf@stark.xeocode.com> Lines: 24 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.048 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200412/25 X-Sequence-Number: 5195 Jan Wieck writes: > Even applications that have statefull enduser terminals (like SAP R/3 for > example) never allow an open transaction over user interaction. I'm not sure using SAP as your paragon of design excellence is a wise choice here. From what I understand SAP implemented its own locking system because the database it was based on didn't offer any locking at all. But your basic point is sound. For a web site I would definitely avoid using anything like database locks and even avoid doing anything with application locks if possible. If you really really want to expose the database session state I think he's on the right track using SQLRelay. This would let him handle reconnecting a user with her session even if she's connecting to a different Apache process. I suspect the database wouldn't really be able to suspend a database connection using any less memory than just keeping the entire backend process with its session around anyways. -- greg