Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id F0443475928; Fri, 19 Jul 2002 10:04:32 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g6JE4aVk012466; Fri, 19 Jul 2002 10:04:36 -0400 (EDT) To: "Andy Marden" Cc: pgsql-admin@postgresql.org, pgsql-general@postgresql.org Subject: Re: Long update progress In-reply-to: References: Comments: In-reply-to "Andy Marden" message dated "Fri, 19 Jul 2002 13:31:52 +0100" Date: Fri, 19 Jul 2002 10:04:36 -0400 Message-ID: <12465.1027087476@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200207/288 X-Sequence-Number: 4972 "Andy Marden" 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