pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedLong update progress
4+ messages / 3 participants
[nested] [flat]
* Long update progress
@ 2002-07-19 12:31 Andy Marden <amarden@usa.net>
2002-07-19 12:46 ` Re: Long update progress mallah@trade-india.com
2002-07-19 14:04 ` Re: Long update progress Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 4+ messages in thread
From: Andy Marden @ 2002-07-19 12:31 UTC (permalink / raw)
To: pgsql-admin; pgsql-general@postgresql.org
We have an database batch update process running. It runs normally and takes
around 6 hours. This is dealing with a much larger data set after an error
correction. It's been running for 6 days now and people are getting twitchy
that it might not finish. Is there any way (accepting that more preparation
would, in retrospect, have been better) to tell how far we're got. This
iterates round a cursor and updates individual rows. The trouble is it
commits once at the end.
The ideal would be to find a way of doing a dirty read against the table
that is bing updated. Then we'd know how many rows had been processed.
Any ideas?
Cheers
Andy
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Long update progress
2002-07-19 12:31 Long update progress Andy Marden <amarden@usa.net>
@ 2002-07-19 12:46 ` mallah@trade-india.com
2002-07-19 12:52 ` Re: Long update progress Andy Marden <amarden@usa.net>
1 sibling, 1 reply; 4+ messages in thread
From: mallah@trade-india.com @ 2002-07-19 12:46 UTC (permalink / raw)
To: amarden@usa.net; +Cc: pgsql-admin; pgsql-general@postgresql.org
create a sequence and somehow involve it in a dummy manner in the update...
do a select current_val('sequence') to see how far updates have gone...
can we see the update stmt?
regds
mallah.
> We have an database batch update process running. It runs normally and
> takes around 6 hours. This is dealing with a much larger data set after
> an error correction. It's been running for 6 days now and people are
> getting twitchy that it might not finish. Is there any way (accepting
> that more preparation would, in retrospect, have been better) to tell
> how far we're got. This iterates round a cursor and updates individual
> rows. The trouble is it commits once at the end.
>
> The ideal would be to find a way of doing a dirty read against the
> table that is bing updated. Then we'd know how many rows had been
> processed.
>
> Any ideas?
>
> Cheers
>
> Andy
>
>
>
> ---------------------------(end of
> broadcast)--------------------------- TIP 5: Have you checked our
> extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
-----------------------------------------
Get your free web based email at trade-india.com.
"India's Leading B2B eMarketplace.!"
http://www.trade-india.com/
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Long update progress
2002-07-19 12:31 Long update progress Andy Marden <amarden@usa.net>
2002-07-19 12:46 ` Re: Long update progress mallah@trade-india.com
@ 2002-07-19 12:52 ` Andy Marden <amarden@usa.net>
0 siblings, 0 replies; 4+ messages in thread
From: Andy Marden @ 2002-07-19 12:52 UTC (permalink / raw)
To: mallah@trade-india.com; +Cc: pgsql-admin; pgsql-general@postgresql.org
The trouble is, the update's running at the moment - it's
actually a cursor with the updtae running for each selected row
in the cursor. If it's a case of running it again, I'll put a
commit every 'n' in there so that we see things. What I need to
be able to gauge is what has happened in the procedure so far.
Alternatively, if I could force it to abort, but commit what
it's done so far externally, then that would be fine too.
----- Original Message -----
From: <mallah@trade-india.com>
To: <amarden@usa.net>
Cc: <pgsql-admin@postgresql.org>; <pgsql-general@postgresql.org>
Sent: Friday, July 19, 2002 1:46 PM
Subject: Re: [ADMIN] Long update progress
>
> create a sequence and somehow involve it in a dummy manner in
the update...
>
> do a select current_val('sequence') to see how far updates
have gone...
>
> can we see the update stmt?
>
> regds
> mallah.
>
>
> > We have an database batch update process running. It runs
normally and
> > takes around 6 hours. This is dealing with a much larger
data set after
> > an error correction. It's been running for 6 days now and
people are
> > getting twitchy that it might not finish. Is there any way
(accepting
> > that more preparation would, in retrospect, have been
better) to tell
> > how far we're got. This iterates round a cursor and updates
individual
> > rows. The trouble is it commits once at the end.
> >
> > The ideal would be to find a way of doing a dirty read
against the
> > table that is bing updated. Then we'd know how many rows had
been
> > processed.
> >
> > Any ideas?
> >
> > Cheers
> >
> > Andy
> >
> >
> >
> > ---------------------------(end of
> > broadcast)--------------------------- TIP 5: Have you
checked our
> > extensive FAQ?
> >
> > http://www.postgresql.org/users-lounge/docs/faq.html
>
>
>
> -----------------------------------------
> Get your free web based email at trade-india.com.
> "India's Leading B2B eMarketplace.!"
> http://www.trade-india.com/
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Long update progress
2002-07-19 12:31 Long update progress Andy Marden <amarden@usa.net>
@ 2002-07-19 14:04 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 4+ messages in thread
From: Tom Lane @ 2002-07-19 14:04 UTC (permalink / raw)
To: Andy Marden <amarden@usa.net>; +Cc: pgsql-admin; pgsql-general@postgresql.org
"Andy Marden" <amarden@usa.net> writes:
> We have an database batch update process running. It runs normally and takes
> around 6 hours. This is dealing with a much larger data set after an error
> correction. It's been running for 6 days now and people are getting twitchy
> that it might not finish. Is there any way (accepting that more preparation
> would, in retrospect, have been better) to tell how far we're got. This
> iterates round a cursor and updates individual rows. The trouble is it
> commits once at the end.
> The ideal would be to find a way of doing a dirty read against the table
> that is bing updated. Then we'd know how many rows had been processed.
A quick and dirty answer is just to watch the physical file for the
table being updated, and see how fast it's growing.
If you're using 7.2 then the contrib/pgstattuple function would let you
get more accurate info (note it will count not-yet-committed tuples as
"dead", which is a tad misleading, but at least it counts 'em).
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2002-07-19 14:04 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-07-19 12:31 Long update progress Andy Marden <amarden@usa.net>
2002-07-19 12:46 ` mallah@trade-india.com
2002-07-19 12:52 ` Andy Marden <amarden@usa.net>
2002-07-19 14:04 ` Tom Lane <tgl@sss.pgh.pa.us>
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