Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUEck-0005lu-3m for pgsql-performance@arkaria.postgresql.org; Tue, 25 Aug 2015 13:50:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZUEcj-0007jS-MH for pgsql-performance@arkaria.postgresql.org; Tue, 25 Aug 2015 13:50:49 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZUEcj-0007jJ-4J for pgsql-performance@postgresql.org; Tue, 25 Aug 2015 13:50:49 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZUEcf-00051m-6t for pgsql-performance@postgresql.org; Tue, 25 Aug 2015 13:50:47 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t7PDogmk019481; Tue, 25 Aug 2015 09:50:42 -0400 From: Tom Lane To: Johann Spies cc: pgsql-performance@postgresql.org Subject: Re: Long running query: How to monitor the progress In-reply-to: References: Comments: In-reply-to Johann Spies message dated "Tue, 25 Aug 2015 09:22:45 +0200" Date: Tue, 25 Aug 2015 09:50:42 -0400 Message-ID: <19480.1440510642@sss.pgh.pa.us> X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Johann Spies writes: > Some of hour queries to extract the data and insert it in other tables runs > for days and in one case we have created a table with 758million unique > records. > Now my question. Is there a way to monitor the progress of a long running > query like this? You could watch how fast the target table is physically growing, perhaps. Or I think contrib/pgstattuple could be used to count uncommitted tuples in it. regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance