Seeing uncommitted transactions

Started by Steve Atkinsalmost 22 years ago4 messagesgeneral
Jump to latest
#1Steve Atkins
steve@blighty.com

Is there any way to look at the database as though you were inside another
sessions transaction?

I've had two cases recently where this would have been somewhat useful. In one,
a select into query ran for several hours and it would have been nice to
see that it was running correctly. In the other an application threw a
spurious BEGIN into the stream of operations, meaning that changes made
weren't visible to the rest of the world until it started another transaction
(which was ignored) and then committed it.

Cheers,
Steve

#2Alvaro Herrera
alvherre@dcc.uchile.cl
In reply to: Steve Atkins (#1)
Re: Seeing uncommitted transactions

On Mon, Jun 28, 2004 at 01:33:33PM -0700, Steve Atkins wrote:

Is there any way to look at the database as though you were inside another
sessions transaction?

Not currently.

Maybe actually you _could_ do it with a C function, but it will require
a lot of backend internal knowledge.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Y eso te lo doy firmado con mis l�grimas" (Fiebre del Loco)

#3Carl E. McMillin
carlymac@earthlink.net
In reply to: Steve Atkins (#1)
Re: Seeing uncommitted transactions

Could you do this by setting debug-level higher and do log-analysis?

BTW, it might be nice to give the backends a diagnostic port for "remote
debugging" in similar wise as the Java Virtual Machine provides so that some
degree of live-time workflow examination can happen. What do you think?

Carl <|};-)>

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Steve Atkins
Sent: Monday, June 28, 2004 1:34 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Seeing uncommitted transactions

Is there any way to look at the database as though you were inside another
sessions transaction?

I've had two cases recently where this would have been somewhat useful. In
one, a select into query ran for several hours and it would have been nice
to see that it was running correctly. In the other an application threw a
spurious BEGIN into the stream of operations, meaning that changes made
weren't visible to the rest of the world until it started another
transaction (which was ignored) and then committed it.

Cheers,
Steve

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Carl E. McMillin (#3)
Re: Seeing uncommitted transactions

"Carl E. McMillin" <carlymac@earthlink.net> writes:

BTW, it might be nice to give the backends a diagnostic port for "remote
debugging" in similar wise as the Java Virtual Machine provides so that some
degree of live-time workflow examination can happen. What do you
think?

It's called gdb ;-)

regards, tom lane