X-Original-To: pgsql-admin@postgresql.org Received: from localhost.localdomain (unknown [65.217.53.66]) by postgresql.org (Postfix) with ESMTP id 4EB93475FD9 for ; Tue, 18 Mar 2003 12:25:42 -0500 (EST) Received: from thorn.mmrd.com (thorn.mmrd.com [172.25.10.100]) by localhost.localdomain (8.12.5/8.12.5) with ESMTP id h2IHx46P010030; Tue, 18 Mar 2003 12:59:04 -0500 Received: from gnvex001.mmrd.com (gnvex001.mmrd.com [192.168.3.55]) by thorn.mmrd.com (8.11.6/8.11.6) with ESMTP id h2IHPjp05880; Tue, 18 Mar 2003 12:25:46 -0500 Received: from camel.mmrd.com ([172.25.5.213]) by gnvex001.mmrd.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id F3HTJ6HT; Tue, 18 Mar 2003 12:25:45 -0500 Subject: Re: Session disconnected From: Robert Treat To: "Jan.Lindgren" Cc: pgsql-admin@postgresql.org In-Reply-To: <003501c2e94b$494569a0$890310ac@Frodo> References: <003501c2e94b$494569a0$890310ac@Frodo> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 18 Mar 2003 12:25:45 -0500 Message-Id: <1048008345.23066.1453.camel@camel> Mime-Version: 1.0 X-Archive-Number: 200303/290 X-Sequence-Number: 7930 On Thu, 2003-03-13 at 05:28, Jan.Lindgren wrote: > Hi, > I got a question on how postgres handle an interrupted transaction, > regarding rollback, commit. > > We do have a rather unstable connection to our db and sometime a > transaction/session will be disconnected but the process is still > visible on the server. > > How will postgres handle an update transaction from a client to the > server that is disconnected? > - will the query be rollbacked automatically ?? > - is it safe to just kill the hanging process on the server? > More or less yes. Without getting too far into the pg internals, understand that any information written in the database is not marked as valid until it is given a commit. Eventually vacuum will notice that the transaction tied to the entry is no longer valid, and will remove the dead weight. Robert Treat