pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Treat <xzilla@users.sourceforge.net>
To: Jan.Lindgren <jan.lindgren@stabilizer.se>
Cc: pgsql-admin@postgresql.org
Subject: Re: Session disconnected
Date: 18 Mar 2003 12:25:45 -0500
Message-ID: <1048008345.23066.1453.camel@camel> (raw)
In-Reply-To: <003501c2e94b$494569a0$890310ac@Frodo>
References: <003501c2e94b$494569a0$890310ac@Frodo>

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





view thread (2+ messages)

Message-ID: <1048008345.23066.1453.camel@camel>
Permalink:  ../1048008345.23066.1453.camel@camel/
Also on:    postgresql.org/message-id/1048008345.23066.1453.camel@camel

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: xzilla@users.sourceforge.net, jan.lindgren@stabilizer.se
  Subject: Re: Session disconnected
  In-Reply-To: <1048008345.23066.1453.camel@camel>
  References: <003501c2e94b$494569a0$890310ac@Frodo> <1048008345.23066.1453.camel@camel>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox