From jan.lindgren@stabilizer.se Thu Mar 13 10:28:38 2003 X-Original-To: pgsql-admin@postgresql.org Received: from lmain.chalmersinnovation.com (chl2.aktiviteten.se [193.12.242.134]) by postgresql.org (Postfix) with ESMTP id 14B16475A45 for ; Thu, 13 Mar 2003 05:28:38 -0500 (EST) Received: from FRODO ([172.16.3.137]) by lmain.chalmersinnovation.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id FWSJ48G0; Thu, 13 Mar 2003 11:08:11 +0100 From: "Jan.Lindgren" To: Subject: Session disconnected Date: Thu, 13 Mar 2003 11:28:04 +0100 Message-ID: <003501c2e94b$494569a0$890310ac@Frodo> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0036_01C2E953.AB09D1A0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal X-Archive-Number: 200303/193 X-Sequence-Number: 7833 This is a multi-part message in MIME format. ------=_NextPart_000_0036_01C2E953.AB09D1A0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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? Regards Jan Lindgren, Stabilizer ------=_NextPart_000_0036_01C2E953.AB09D1A0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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 so= metime 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?

= -      =     wi= ll t= he query be rollbacked automatically ??

= -      =     is= i= t safe to just kill the hanging process on the server?

 

Regards

Jan Lindgren, Stabilizer

 

------=_NextPart_000_0036_01C2E953.AB09D1A0-- From xzilla@users.sourceforge.net Tue Mar 18 17:25:42 2003 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