Skip site navigation (1) Skip section navigation (2)

Tranactions and viewing updated data

From: Steve Tucknott <steve(at)retsol(dot)co(dot)uk>
To: PostGreSQL <pgsql-novice(at)postgresql(dot)org>
Subject: Tranactions and viewing updated data
Date: 2005-10-06 11:23:10
Message-ID: 1128597791.2786.19.camel@retsol1 (view raw or flat)
Thread:
Lists: pgsql-novice
Postgresql 7.4.5 On RedHat 8

Is there a way to see what is happening with a process?

We have a 4gl module that maintains our database (ie creates the tables,
adds columns etc) - the problem (?) is that when it runs there is no
'visibility' of what's going on - for example  I am just updating a
400,000 row table - the table has had 3 new columns appended to it - two
of the three columns need to be NOT NULL - so the the process does:

ALTER TABLE blah ADD COLUMN blah ....;

UPDATE blah
     SET blah = 'blah' .....

ALTER TABLE blah ALTER COLUMN blah SET NOT NULL;

I can see from a ps statement that there is an UPDATE statement running,
but is there anyway of seeing how far through the update it is? I assume
that I can't see the data until the whole 'implied' transaction is
complete (ie all 400,000 rows updated) - is there a 

The process has been running for 60 minutes and I don't want to kill it
if it's nearly complete (I have just realised that the update triggers
on the table weren't disabled before the run - so that is slowing it
down)

Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2005-10-06 13:47:51
Subject: Re: Tranactions and viewing updated data
Previous:From: Jaromír KamlerDate: 2005-10-06 10:53:14
Subject: Re: stupid SQL question, how reach different rows of two almost same tables

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group