Re: Session disconnected - Mailing list pgsql-admin

From Robert Treat
Subject Re: Session disconnected
Date
Msg-id 1048008345.23066.1453.camel@camel
Whole thread Raw
In response to Session disconnected  ("Jan.Lindgren" <jan.lindgren@stabilizer.se>)
List pgsql-admin
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



pgsql-admin by date:

Previous
From: Robert Treat
Date:
Subject: Re: Problem accessing database using DB Visualizer
Next
From: "lists"
Date:
Subject: Problem restoring a database