Re: Committed updates don't seem to be committed.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Frank Kurzawa <fkurzawa(at)topazsoftware(dot)com>
Cc: mike(at)thegodshalls(dot)com, pgsql-novice(at)postgresql(dot)org
Subject: Re: Committed updates don't seem to be committed.
Date: 2004-06-23 15:26:32
Message-ID: 2700.1088004392@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Frank Kurzawa <fkurzawa(at)topazsoftware(dot)com> writes:
> Let's assume that there is a bug in hibernate that is causing it to
> start a transaction behind my back. I'm trying to understand what
> footprints it would leave and I see three possibilities:
> a) It later commits the transaction behind my back
> b) It later rolls back the transaction behind my back
> c) It just leaves the transaction uncommitted/unrolledback/just
> dangling out there.
> ...
> That leaves (c): What would this look like?
> If I do a 'ps -efl' should I find a postgres process in a particular
> state? ('idle waiting on transaction', 'idle in transaction', or
> something else)?

"idle in transaction" would be the usual state in such a case.

> Should there be some other footprints lying around that I can look at?
> Some record of the pending transaction in some postgres system tables?

pg_locks will show an entry with (IIRC) an ExclusiveLock on a
transaction number for each open transaction.

You could also enable query logging and just look for begin/commit commands.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2004-06-23 17:15:30 Re: where and how can I get a software for postgres - database?
Previous Message M. Bastin 2004-06-23 13:07:16 Re: where and how can I get a software for postgres -