From asif_icrossing@yahoo.com Wed Dec 6 17:07:12 2006 Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 8CE7C9F93E2 for ; Wed, 6 Dec 2006 13:07:12 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 65084-04 for ; Wed, 6 Dec 2006 13:07:03 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from web58414.mail.re3.yahoo.com (web58414.mail.re3.yahoo.com [68.142.236.182]) by postgresql.org (Postfix) with SMTP id 95A279F9F0E for ; Wed, 6 Dec 2006 13:07:04 -0400 (AST) Received: (qmail 25573 invoked by uid 60001); 6 Dec 2006 17:07:03 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=oBWnA1fG/SjhW/I0GmWqCIae4QfIejCcXMz7P7xmPZ2UK83/f3NkQCfhE8q1/M0A3ygUFnNqYeir5qU33axlwUljBu0JZhaU0wvZnVrh9puK7zIPDZm4QKjnLrKK1nolLFuITlezoBPfu2gUkw5aYF+VdYaaDpfv7SFDQZXOMfw=; X-YMail-OSG: rLAGXYMVM1kCFtjs1ZAxAxxrX8pnQKJgdDJWc6K4lzoeVMkusGGkXnbCfj9TZfZn28wFRN5L_2Nr.ZIENO8sRO8p8teFDpFiRsixhB6imEbgeydSBG52hSiWd4s2dFfqyAPaYGSOmBRIQSg- Received: from [65.218.233.130] by web58414.mail.re3.yahoo.com via HTTP; Wed, 06 Dec 2006 09:07:03 PST Date: Wed, 6 Dec 2006 09:07:03 -0800 (PST) From: asif ali Subject: VACUUM FULL does not works....... To: pgsql-performance@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-716178976-1165424823=:25526" Content-Transfer-Encoding: 8bit Message-ID: <155293.25526.qm@web58414.mail.re3.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.587 tagged_above=0 required=5 tests=AWL, BAYES_50, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS, HTML_MESSAGE X-Spam-Level: * X-Archive-Number: 200612/128 X-Sequence-Number: 22184 --0-716178976-1165424823=:25526 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I have a "product" table having 350 records. It takes approx 1.8 seconds to get all records from this table. I copies this table to a "product_temp" table and run the same query to select all records; and it took 10ms(much faster). I did "VACUUM FULL" on "product" table but It did not work. I checked the file size of these two tables. "product" table's file size is "32mb" and "product_temp" table's file size is "72k". So, it seems that "VACUUM FULL" is not doing anything. Please suggest. asif ali icrossing inc. --------------------------------- Have a burning question? Go to Yahoo! Answers and get answers from real people who know. --0-716178976-1165424823=:25526 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi,
I have a "product" table having 350 records. It takes approx 1.8 seconds to get all records from this table. I copies this table to a "product_temp" table and run the same query to select all records; and it took 10ms(much faster).
I did "VACUUM FULL" on "product" table but It did not work.

I checked the file size of these two tables. 
"product" table's file size is "32mb" and
"product_temp" table's file size is "72k".

So, it seems that "VACUUM FULL" is not doing anything.
Please suggest.

asif ali
icrossing inc.


Have a burning question? Go to Yahoo! Answers and get answers from real people who know. --0-716178976-1165424823=:25526-- From jmreymond@gmail.com Wed Dec 6 17:13:17 2006 Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 5016F9F9F0E for ; Wed, 6 Dec 2006 13:13:17 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 74415-07 for ; Wed, 6 Dec 2006 13:13:10 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by postgresql.org (Postfix) with ESMTP id 6A8219F93E2 for ; Wed, 6 Dec 2006 13:13:10 -0400 (AST) Received: by nf-out-0910.google.com with SMTP id x4so646306nfb for ; Wed, 06 Dec 2006 09:13:08 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qb8J/usZoNskgQfRBgvvq0L0UwYy4cSQ8OlxdpjWupEYXTmPju9IF5pLKTzVZVd87c07lyPQOHWpTDYxlsB1a0I+qex42LB+ckrEDfB3GyDkmFXx+gnzima0FbffLaXH5XSkgPsQXt4p2o4ffK70TATX2EH+kwfJvqYxkxehFMQ= Received: by 10.82.113.6 with SMTP id l6mr262985buc.1165425188036; Wed, 06 Dec 2006 09:13:08 -0800 (PST) Received: by 10.82.167.15 with HTTP; Wed, 6 Dec 2006 09:13:07 -0800 (PST) Message-ID: <4b09a0c0612060913j6ebcaf79k4e4372a7794a02c9@mail.gmail.com> Date: Wed, 6 Dec 2006 18:13:07 +0100 From: "Jean-Max Reymond" To: "asif ali" Subject: Re: VACUUM FULL does not works....... Cc: pgsql-performance@postgresql.org In-Reply-To: <155293.25526.qm@web58414.mail.re3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <155293.25526.qm@web58414.mail.re3.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/129 X-Sequence-Number: 22185 2006/12/6, asif ali : > Hi, > I have a "product" table having 350 records. It takes approx 1.8 seconds to > get all records from this table. I copies this table to a "product_temp" > table and run the same query to select all records; and it took 10ms(much > faster). > I did "VACUUM FULL" on "product" table but It did not work. > > I checked the file size of these two tables. > "product" table's file size is "32mb" and > "product_temp" table's file size is "72k". > > So, it seems that "VACUUM FULL" is not doing anything. > Please suggest. try VACUUM FULL VERBOSE and report the result. -- Jean-Max Reymond CKR Solutions Open Source Nice France http://www.ckr-solutions.com From smarlowe@g2switchworks.com Wed Dec 6 17:21:02 2006 Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 21A059FA1A7 for ; Wed, 6 Dec 2006 13:21:02 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 58440-09 for ; Wed, 6 Dec 2006 13:20:47 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id 9E2759F9F0E for ; Wed, 6 Dec 2006 13:20:47 -0400 (AST) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Wed, 6 Dec 2006 17:20:42 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 06 Dec 2006 11:20:43 -0600 Subject: Re: VACUUM FULL does not works....... From: Scott Marlowe To: asif ali Cc: pgsql-performance@postgresql.org In-Reply-To: <155293.25526.qm@web58414.mail.re3.yahoo.com> References: <155293.25526.qm@web58414.mail.re3.yahoo.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1165425643.14565.471.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Wed, 06 Dec 2006 11:20:43 -0600 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/130 X-Sequence-Number: 22186 On Wed, 2006-12-06 at 11:07, asif ali wrote: > Hi, > I have a "product" table having 350 records. It takes approx 1.8 > seconds to get all records from this table. I copies this table to a > "product_temp" table and run the same query to select all records; and > it took 10ms(much faster). > I did "VACUUM FULL" on "product" table but It did not work. > > I checked the file size of these two tables. > "product" table's file size is "32mb" and > "product_temp" table's file size is "72k". > > So, it seems that "VACUUM FULL" is not doing anything. > Please suggest. More than likely you've got a long running transaction that the vacuum can't vacuum around. From mallah.rajesh@gmail.com Wed Dec 6 17:47:24 2006 Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 544BF9FA2EC for ; Wed, 6 Dec 2006 13:47:24 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 62482-09 for ; Wed, 6 Dec 2006 13:47:11 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.182]) by postgresql.org (Postfix) with ESMTP id 2A5A29FA28E for ; Wed, 6 Dec 2006 13:47:12 -0400 (AST) Received: by py-out-1112.google.com with SMTP id d32so153287pye for ; Wed, 06 Dec 2006 09:47:11 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HzN9iKvL2sadlmszGZnERD2rWMOmMmUTJLt8SjOxm/j2Q3n/MAqGin0aOOuU8+syvHpPF7fH/VxmxRWGib+xZIk4fpKkSk1GJYLso21dA1LUTBw1/Jwsc/uE6VO1xPFuwPbmXt5PNCDme84UI+xGthdJUCOCxYrf/bW4VaoVXvY= Received: by 10.35.62.1 with SMTP id p1mr1896437pyk.1165427230998; Wed, 06 Dec 2006 09:47:10 -0800 (PST) Received: by 10.35.80.8 with HTTP; Wed, 6 Dec 2006 09:47:10 -0800 (PST) Message-ID: Date: Wed, 6 Dec 2006 23:17:10 +0530 From: "Rajesh Kumar Mallah" To: "asif ali" Subject: Re: VACUUM FULL does not works....... Cc: pgsql-performance@postgresql.org In-Reply-To: <155293.25526.qm@web58414.mail.re3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <155293.25526.qm@web58414.mail.re3.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/133 X-Sequence-Number: 22189 On 12/6/06, asif ali wrote: > Hi, > I have a "product" table having 350 records. It takes approx 1.8 seconds to > get all records from this table. I copies this table to a "product_temp" > table and run the same query to select all records; and it took 10ms(much > faster). > I did "VACUUM FULL" on "product" table but It did not work. > > I checked the file size of these two tables. > "product" table's file size is "32mb" and > "product_temp" table's file size is "72k". > > So, it seems that "VACUUM FULL" is not doing anything. > Please suggest. It is desirable that PostgreSQL version be reported in problem descriptions. Older versions of pgsql had problem of index bloat. It is interesting to find out why VACUUM FULL does not work in your case(wait for the experts) , but most probably CLUSTERING the table on primary key is going to solve the query performance problem (temporarily) > > asif ali > icrossing inc. > > ________________________________ > Have a burning question? Go to Yahoo! Answers and get answers from real > people who know. From asif_icrossing@yahoo.com Wed Dec 6 18:37:36 2006 Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 954EC9F938C for ; Wed, 6 Dec 2006 14:37:36 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 74182-09 for ; Wed, 6 Dec 2006 14:37:20 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from web58403.mail.re3.yahoo.com (web58403.mail.re3.yahoo.com [68.142.236.171]) by postgresql.org (Postfix) with SMTP id 846D79F9F7B for ; Wed, 6 Dec 2006 14:37:22 -0400 (AST) Received: (qmail 83789 invoked by uid 60001); 6 Dec 2006 18:37:20 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=NOIfRnC4VmwAvZcrvyYJI8RkEXz6Spao9jKz0SXQvB9lNLBaGa3ALQQ/1RGm5QA97b4nvk1p5dv2ve5x5B/YijMnkubxJiMaOMSWVz7si0QnuyzC5LFf1E8eGti9quZmxffrYVaBDmW/4n/yyrF1EdadUxUMiIs1Ag//mABmMvE=; X-YMail-OSG: 50JcCUMVM1l7U6Qwd5s7VzLjDpO6ncGhtELSJTxevTYYMohUEwsr1y.vklQXl4RBLEiAHf_6MoAw0UEoXcUNLbI.o_fB3cqT4iNIPiJAt6H2Vt7RYSg6TnCwlA8F30fHq4QZMtAXPCC3VH4- Received: from [65.218.233.130] by web58403.mail.re3.yahoo.com via HTTP; Wed, 06 Dec 2006 10:37:20 PST Date: Wed, 6 Dec 2006 10:37:20 -0800 (PST) From: asif ali Subject: Re: VACUUM FULL does not works....... To: pgsql-performance@postgresql.org In-Reply-To: <4b09a0c0612060913j6ebcaf79k4e4372a7794a02c9@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-521951706-1165430240=:83683" Content-Transfer-Encoding: 8bit Message-ID: <427904.83683.qm@web58403.mail.re3.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.208 tagged_above=0 required=5 tests=AWL, BAYES_50, HTML_10_20, HTML_MESSAGE X-Spam-Level: * X-Archive-Number: 200612/139 X-Sequence-Number: 22195 --0-521951706-1165430240=:83683 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Thanks for the prompt reply... Here is the output of "VACUUM FULL VERBOSE" The postgres version is "8.0.3". Thanks asif ali icrossing inc INFO: vacuuming "public.product_table" INFO: "product_table": found 0 removable, 139178 nonremovable row versions in 4305 pages DETAIL: 138859 dead row versions cannot be removed yet. Nonremovable row versions range from 152 to 273 bytes long. There were 26916 unused item pointers. Total free space (including removable row versions) is 4507788 bytes. 249 pages are or will become empty, including 0 at the end of the table. 746 pages containing 4286656 free bytes are potential move destinations. CPU 0.04s/0.06u sec elapsed 0.15 sec. INFO: index "product_table_client_name_unique" now contains 139178 row versions in 3916 pages DETAIL: 0 index row versions were removed. 2539 index pages have been deleted, 2055 are currently reusable. CPU 0.08s/0.02u sec elapsed 0.76 sec. INFO: index "product_table_cpc_agent_id_unique" now contains 139178 row versions in 1980 pages DETAIL: 0 index row versions were removed. 1162 index pages have been deleted, 950 are currently reusable. CPU 0.04s/0.02u sec elapsed 0.49 sec. INFO: index "product_table_pk" now contains 139178 row versions in 3472 pages DETAIL: 0 index row versions were removed. 2260 index pages have been deleted, 1870 are currently reusable. CPU 0.08s/0.02u sec elapsed 0.53 sec. INFO: "product_table": moved 18631 row versions, truncated 4305 to 4299 pages DETAIL: CPU 0.18s/1.14u sec elapsed 2.38 sec. INFO: index "product_table_client_name_unique" now contains 157728 row versions in 3916 pages DETAIL: 81 index row versions were removed. 2407 index pages have been deleted, 1923 are currently reusable. CPU 0.04s/0.01u sec elapsed 0.17 sec. INFO: index "product_table_cpc_agent_id_unique" now contains 157728 row versions in 1980 pages DETAIL: 81 index row versions were removed. 1100 index pages have been deleted, 888 are currently reusable. CPU 0.03s/0.01u sec elapsed 0.16 sec. INFO: index "product_table_pk" now contains 157728 row versions in 3472 pages DETAIL: 81 index row versions were removed. 2150 index pages have been deleted, 1760 are currently reusable. CPU 0.05s/0.01u sec elapsed 0.30 sec. INFO: vacuuming "pg_toast.pg_toast_11891545" INFO: "pg_toast_11891545": found 0 removable, 0 nonremovable row versions in 0 pages DETAIL: 0 dead row versions cannot be removed yet. Nonremovable row versions range from 0 to 0 bytes long. There were 0 unused item pointers. Total free space (including removable row versions) is 0 bytes. 0 pages are or will become empty, including 0 at the end of the table. 0 pages containing 0 free bytes are potential move destinations. CPU 0.00s/0.00u sec elapsed 0.00 sec. INFO: index "pg_toast_11891545_index" now contains 0 row versions in 1 pages DETAIL: 0 index pages have been deleted, 0 are currently reusable. CPU 0.00s/0.00u sec elapsed 0.00 sec. Query returned successfully with no result in 5201 ms. Jean-Max Reymond wrote: 2006/12/6, asif ali : > Hi, > I have a "product" table having 350 records. It takes approx 1.8 seconds to > get all records from this table. I copies this table to a "product_temp" > table and run the same query to select all records; and it took 10ms(much > faster). > I did "VACUUM FULL" on "product" table but It did not work. > > I checked the file size of these two tables. > "product" table's file size is "32mb" and > "product_temp" table's file size is "72k". > > So, it seems that "VACUUM FULL" is not doing anything. > Please suggest. try VACUUM FULL VERBOSE and report the result. -- Jean-Max Reymond CKR Solutions Open Source Nice France http://www.ckr-solutions.com ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend --------------------------------- Want to start your own business? Learn how on Yahoo! Small Business. --0-521951706-1165430240=:83683 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Thanks for the prompt reply...
Here is the output of "VACUUM FULL VERBOSE"
The postgres version is "8.0.3".

Thanks
asif ali
icrossing inc

INFO:  vacuuming "public.product_table"
INFO:  "product_table": found 0 removable, 139178 nonremovable row versions in 4305 pages
DETAIL:  138859 dead row versions cannot be removed yet.
Nonremovable row versions range from 152 to 273 bytes long.
There were 26916 unused item pointers.
Total free space (including removable row versions) is 4507788 bytes.
249 pages are or will become empty, including 0 at the end of the table.
746 pages containing 4286656 free bytes are potential move destinations.
CPU 0.04s/0.06u sec elapsed 0.15 sec.
INFO:  index "product_table_client_name_unique" now contains 139178 row versions in 3916 pages
DETAIL:  0 index row versions were removed.
2539 index pages have been deleted, 2055 are currently reusable.
CPU 0.08s/0.02u sec elapsed 0.76 sec.
INFO:  index "product_table_cpc_agent_id_unique" now contains 139178 row versions in 1980 pages
DETAIL:  0 index row versions were removed.
1162 index pages have been deleted, 950 are currently reusable.
CPU 0.04s/0.02u sec elapsed 0.49 sec.
INFO:  index "product_table_pk" now contains 139178 row versions in 3472 pages
DETAIL:  0 index row versions were removed.
2260 index pages have been deleted, 1870 are currently reusable.
CPU 0.08s/0.02u sec elapsed 0.53 sec.
INFO:  "product_table": moved 18631 row versions, truncated 4305 to 4299 pages
DETAIL:  CPU 0.18s/1.14u sec elapsed 2.38 sec.
INFO:  index "product_table_client_name_unique" now contains 157728 row versions in 3916 pages
DETAIL:  81 index row versions were removed.
2407 index pages have been deleted, 1923 are currently reusable.
CPU 0.04s/0.01u sec elapsed 0.17 sec.
INFO:  index "product_table_cpc_agent_id_unique" now contains 157728 row versions in 1980 pages
DETAIL:  81 index row versions were removed.
1100 index pages have been deleted, 888 are currently reusable.
CPU 0.03s/0.01u sec elapsed 0.16 sec.
INFO:  index "product_table_pk" now contains 157728 row versions in 3472 pages
DETAIL:  81 index row versions were removed.
2150 index pages have been deleted, 1760 are currently reusable.
CPU 0.05s/0.01u sec elapsed 0.30 sec.
INFO:  vacuuming "pg_toast.pg_toast_11891545"
INFO:  "pg_toast_11891545": found 0 removable, 0 nonremovable row versions in 0 pages
DETAIL:  0 dead row versions cannot be removed yet.
Nonremovable row versions range from 0 to 0 bytes long.
There were 0 unused item pointers.
Total free space (including removable row versions) is 0 bytes.
0 pages are or will become empty, including 0 at the end of the table.
0 pages containing 0 free bytes are potential move destinations.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
INFO:  index "pg_toast_11891545_index" now contains 0 row versions in 1 pages
DETAIL:  0 index pages have been deleted, 0 are currently reusable.
CPU 0.00s/0.00u sec elapsed 0.00 sec.

Query returned successfully with no result in 5201 ms.

Jean-Max Reymond <jmreymond@gmail.com> wrote:
2006/12/6, asif ali :
> Hi,
> I have a "product" table having 350 records. It takes approx 1.8 seconds to
> get all records from this table. I copies this table to a "product_temp"
> table and run the same query to select all records; and it took 10ms(much
> faster).
> I did "VACUUM FULL" on "product" table but It did not work.
>
> I checked the file size of these two tables.
> "product" table's file size is "32mb" and
> "product_temp" table's file size is "72k".
>
> So, it seems that "VACUUM FULL" is not doing anything.
> Please suggest.

try VACUUM FULL VERBOSE and report the result.

--
Jean-Max Reymond
CKR Solutions Open Source
Nice France
http://www.ckr-solutions.com

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


Want to start your own business? Learn how on Yahoo! Small Business. --0-521951706-1165430240=:83683-- From tgl@sss.pgh.pa.us Wed Dec 6 19:55:34 2006 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 172569FA19B for ; Wed, 6 Dec 2006 15:55:34 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 43335-03 for ; Wed, 6 Dec 2006 15:55:27 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id AF73C9F9386 for ; Wed, 6 Dec 2006 15:55:29 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id kB6JtRVN000555; Wed, 6 Dec 2006 14:55:27 -0500 (EST) To: asif ali cc: pgsql-performance@postgresql.org Subject: Re: VACUUM FULL does not works....... In-reply-to: <427904.83683.qm@web58403.mail.re3.yahoo.com> References: <427904.83683.qm@web58403.mail.re3.yahoo.com> Comments: In-reply-to asif ali message dated "Wed, 06 Dec 2006 10:37:20 -0800" Date: Wed, 06 Dec 2006 14:55:27 -0500 Message-ID: <554.1165434927@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/144 X-Sequence-Number: 22200 asif ali writes: > INFO: vacuuming "public.product_table" > INFO: "product_table": found 0 removable, 139178 nonremovable row versions in 4305 pages > DETAIL: 138859 dead row versions cannot be removed yet. So Scott's guess was correct: you've got a whole lot of dead rows in there that will eventually be removable, but not while there's still an open transaction that might be able to "see" them. Find your open transaction and get rid of it (pg_stat_activity might help). regards, tom lane From asif_icrossing@yahoo.com Wed Dec 6 22:08:57 2006 Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id B86FB9F9C35 for ; Wed, 6 Dec 2006 18:08:57 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 58436-05 for ; Wed, 6 Dec 2006 18:08:33 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from web58407.mail.re3.yahoo.com (web58407.mail.re3.yahoo.com [68.142.236.175]) by postgresql.org (Postfix) with SMTP id 88F379F9C9E for ; Wed, 6 Dec 2006 18:08:33 -0400 (AST) Received: (qmail 67206 invoked by uid 60001); 6 Dec 2006 21:53:01 -0000 Message-ID: <20061206215301.67204.qmail@web58407.mail.re3.yahoo.com> DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=4LQT7OfqsLnMGfzi8dlafX9qD3KQRrgSfe39Q0W+8R1JIC8vkcgTYKEt5L1NTE2+SFFgEzU2qev4k0sz8ysUSAgJemdbZnE7toYXWXTF7fFuu6hUB+EVg0jfqE5+G2OFXTmnGmtimRkM42WU05WEUM9wdLZB04YiPMEFVG+W3Z8=; X-YMail-OSG: 3wCQh4UVM1lrLeJSoIp65hqfJ.E4kRAgWmfDkeIHubDUsP08vPzlxIzTx7AahTboztP7Rjn_r1.o7v0R_FaT.CEqw3UJJu5y7XaH3kwhpiwUCla5nN_GHaPUx6g.Lxd64hAYaGrziYNh5wo- Received: from [65.218.233.130] by web58407.mail.re3.yahoo.com via HTTP; Wed, 06 Dec 2006 13:53:01 PST Date: Wed, 6 Dec 2006 13:53:01 -0800 (PST) From: asif ali Subject: Re: VACUUM FULL does not works....... To: pgsql-performance@postgresql.org In-Reply-To: <554.1165434927@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-6887853-1165441981=:66388" Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/155 X-Sequence-Number: 22211 --0-6887853-1165441981=:66388 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Thanks Everybody for helping me out. I checked "pg_stat_activity"/pg_locks, but do not see any activity on the table. How to find a old running transaction... I saw this link, but it did not help.. http://archives.postgresql.org/pgsql-hackers/2005-02/msg00760.php Thanks asif ali icrossing inc Tom Lane wrote: asif ali writes: > INFO: vacuuming "public.product_table" > INFO: "product_table": found 0 removable, 139178 nonremovable row versions in 4305 pages > DETAIL: 138859 dead row versions cannot be removed yet. So Scott's guess was correct: you've got a whole lot of dead rows in there that will eventually be removable, but not while there's still an open transaction that might be able to "see" them. Find your open transaction and get rid of it (pg_stat_activity might help). regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org --------------------------------- Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and get things done faster. --0-6887853-1165441981=:66388 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Thanks Everybody for helping me out.
I checked "pg_stat_activity"/pg_locks, but do not see any activity on the table.
How to find a old running transaction...
I saw this link, but it did not help..
http://archives.postgresql.org/pgsql-hackers/2005-02/msg00760.php

Thanks

asif ali
icrossing inc

Tom Lane <tgl@sss.pgh.pa.us> wrote:
asif ali writes:
> INFO: vacuuming "public.product_table"
> INFO: "product_table": found 0 removable, 139178 nonremovable row versions in 4305 pages
> DETAIL: 138859 dead row versions cannot be removed yet.

So Scott's guess was correct: you've got a whole lot of dead rows in
there that will eventually be removable, but not while there's still
an open transaction that might be able to "see" them. Find your open
transaction and get rid of it (pg_stat_activity might help).

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org


Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and get things done faster. --0-6887853-1165441981=:66388-- From smarlowe@g2switchworks.com Wed Dec 6 22:13:51 2006 Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id C396D9FA103 for ; Wed, 6 Dec 2006 18:13:51 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 66160-06 for ; Wed, 6 Dec 2006 18:13:31 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id 48C949F9C9E for ; Wed, 6 Dec 2006 18:13:35 -0400 (AST) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Wed, 6 Dec 2006 22:13:27 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 06 Dec 2006 16:13:29 -0600 Subject: Re: VACUUM FULL does not works....... From: Scott Marlowe To: asif ali Cc: pgsql-performance@postgresql.org In-Reply-To: <20061206215301.67204.qmail@web58407.mail.re3.yahoo.com> References: <20061206215301.67204.qmail@web58407.mail.re3.yahoo.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1165443208.3243.17.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Wed, 06 Dec 2006 16:13:29 -0600 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/156 X-Sequence-Number: 22212 On Wed, 2006-12-06 at 15:53, asif ali wrote: > Thanks Everybody for helping me out. > I checked "pg_stat_activity"/pg_locks, but do not see any activity on > the table. > How to find a old running transaction... > I saw this link, but it did not help.. > http://archives.postgresql.org/pgsql-hackers/2005-02/msg00760.php Sometimes just using top or ps will show you. on linux you can run top and then hit c for show command line and look for ones that are IDLE Or, try ps: ps axw|grep postgres On my machine normally: 2408 ? S 0:00 /usr/local/pgsql/bin/postmaster -p 5432 -D /home/postgres/data 2615 ? S 0:00 postgres: stats buffer process 2616 ? S 0:00 postgres: stats collector process 2857 ? S 0:00 postgres: writer process 2858 ? S 0:00 postgres: stats buffer process 2859 ? S 0:00 postgres: stats collector process But with an idle transaction: 2408 ? S 0:00 /usr/local/pgsql/bin/postmaster -p 5432 -D /home/postgres/data 2615 ? S 0:00 postgres: stats buffer process 2616 ? S 0:00 postgres: stats collector process 2857 ? S 0:00 postgres: writer process 2858 ? S 0:00 postgres: stats buffer process 2859 ? S 0:00 postgres: stats collector process 8679 ? S 0:00 postgres: smarlowe test [local] idle in transaction Thar she blows! Also, you can restart the database and vacuum it then too. Of course, don't do that during regular business hours... From asif_icrossing@yahoo.com Thu Dec 7 00:19:36 2006 Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 826189F9FB2 for ; Wed, 6 Dec 2006 20:19:36 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 95740-03 for ; Wed, 6 Dec 2006 20:19:28 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from web58411.mail.re3.yahoo.com (web58411.mail.re3.yahoo.com [68.142.236.179]) by postgresql.org (Postfix) with SMTP id 4B6729F9F0E for ; Wed, 6 Dec 2006 20:19:28 -0400 (AST) Received: (qmail 59698 invoked by uid 60001); 7 Dec 2006 00:19:26 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=Zj5B817azerG4Y4rJLjCMOC3PayFWQd0DsW3saTovXXqGmnC/2QnMF3kPDMfpLq5nwXm+VjCh5G8eYpeXvVv408phEudJ8cGLZgRrmD5/zw6/JuA073Xm8iLzusmkCHKN8v97V7c3/U0mMb4i+xjIvbe7LBzNu8BhxRpGf/WrJs=; X-YMail-OSG: zcOihcMVM1l1mUE.HKO7zAGAr2JV1Vmaxcors.ZsO4CSvf6LXmJ5zuzj95ApJNgnHAxQaZSNDTJ1up99A73JsqPnEBXfQKLcRe8Jqn9dGDcC_JEBPmRGuUdMTjgXZyfbFCpDo.ObPYkzaD8- Received: from [65.218.233.130] by web58411.mail.re3.yahoo.com via HTTP; Wed, 06 Dec 2006 16:19:26 PST Date: Wed, 6 Dec 2006 16:19:26 -0800 (PST) From: asif ali Subject: Re: VACUUM FULL does not works....... To: pgsql-performance@postgresql.org In-Reply-To: <1165443208.3243.17.camel@state.g2switchworks.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1348166326-1165450766=:59076" Content-Transfer-Encoding: 8bit Message-ID: <325721.59076.qm@web58411.mail.re3.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.641 tagged_above=0 required=5 tests=AWL, BAYES_50, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS, HTML_MESSAGE X-Spam-Level: * X-Archive-Number: 200612/160 X-Sequence-Number: 22216 --0-1348166326-1165450766=:59076 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Thanks Scott, It worked!!! We killed an old idle running transaction, now everything is fine.. Thanks Again asif ali icrossing inc Scott Marlowe wrote: On Wed, 2006-12-06 at 15:53, asif ali wrote: > Thanks Everybody for helping me out. > I checked "pg_stat_activity"/pg_locks, but do not see any activity on > the table. > How to find a old running transaction... > I saw this link, but it did not help.. > http://archives.postgresql.org/pgsql-hackers/2005-02/msg00760.php Sometimes just using top or ps will show you. on linux you can run top and then hit c for show command line and look for ones that are IDLE Or, try ps: ps axw|grep postgres On my machine normally: 2408 ? S 0:00 /usr/local/pgsql/bin/postmaster -p 5432 -D /home/postgres/data 2615 ? S 0:00 postgres: stats buffer process 2616 ? S 0:00 postgres: stats collector process 2857 ? S 0:00 postgres: writer process 2858 ? S 0:00 postgres: stats buffer process 2859 ? S 0:00 postgres: stats collector process But with an idle transaction: 2408 ? S 0:00 /usr/local/pgsql/bin/postmaster -p 5432 -D /home/postgres/data 2615 ? S 0:00 postgres: stats buffer process 2616 ? S 0:00 postgres: stats collector process 2857 ? S 0:00 postgres: writer process 2858 ? S 0:00 postgres: stats buffer process 2859 ? S 0:00 postgres: stats collector process 8679 ? S 0:00 postgres: smarlowe test [local] idle in transaction Thar she blows! Also, you can restart the database and vacuum it then too. Of course, don't do that during regular business hours... ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings --------------------------------- Have a burning question? Go to Yahoo! Answers and get answers from real people who know. --0-1348166326-1165450766=:59076 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Thanks Scott,
It worked!!!
We killed an old idle running transaction, now everything is fine..

Thanks Again
asif ali
icrossing inc

Scott Marlowe <smarlowe@g2switchworks.com> wrote:
On Wed, 2006-12-06 at 15:53, asif ali wrote:
> Thanks Everybody for helping me out.
> I checked "pg_stat_activity"/pg_locks, but do not see any activity on
> the table.
> How to find a old running transaction...
> I saw this link, but it did not help..
> http://archives.postgresql.org/pgsql-hackers/2005-02/msg00760.php

Sometimes just using top or ps will show you.

on linux you can run top and then hit c for show command line and look
for ones that are IDLE

Or, try ps:

ps axw|grep postgres

On my machine normally:

2408 ? S 0:00 /usr/local/pgsql/bin/postmaster -p 5432 -D /home/postgres/data
2615 ? S 0:00 postgres: stats buffer process
2616 ? S 0:00 postgres: stats collector process
2857 ? S 0:00 postgres: writer process
2858 ? S 0:00 postgres: stats buffer process
2859 ? S 0:00 postgres: stats collector process

But with an idle transaction:

2408 ? S 0:00 /usr/local/pgsql/bin/postmaster -p 5432 -D /home/postgres/data
2615 ? S 0:00 postgres: stats buffer process
2616 ? S 0:00 postgres: stats collector process
2857 ? S 0:00 postgres: writer process
2858 ? S 0:00 postgres: stats buffer process
2859 ? S 0:00 postgres: stats collector process
8679 ? S 0:00 postgres: smarlowe test [local] idle in transaction

Thar she blows!

Also, you can restart the database and vacuum it then too. Of course,
don't do that during regular business hours...

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


Have a burning question? Go to Yahoo! Answers and get answers from real people who know. --0-1348166326-1165450766=:59076-- From mallah.rajesh@gmail.com Thu Dec 7 06:58:43 2006 Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8762A9FA162 for ; Thu, 7 Dec 2006 02:58:43 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 85431-09 for ; Thu, 7 Dec 2006 02:58:38 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.177]) by postgresql.org (Postfix) with ESMTP id A001C9F938C for ; Thu, 7 Dec 2006 02:58:38 -0400 (AST) Received: by py-out-1112.google.com with SMTP id d32so217715pye for ; Wed, 06 Dec 2006 22:58:37 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=pQBRgFOjYrF6DJ/6W7ai5sA/o0vdpq3YAVlvCpup1bjOYXg9veWzuF2ZkcX6xp8Two446zrUeZw6lJ1owUmodI0iCtq3wy/MwCNheAktNWgAQw8qzWbbvWRB3niTZ2pnLyB4orYl3fYD3ejs7MIpNrPVcKRsaPT3r0T3/1kpppY= Received: by 10.35.81.1 with SMTP id i1mr2603028pyl.1165474717708; Wed, 06 Dec 2006 22:58:37 -0800 (PST) Received: by 10.35.80.8 with HTTP; Wed, 6 Dec 2006 22:58:37 -0800 (PST) Message-ID: Date: Thu, 7 Dec 2006 12:28:37 +0530 From: "Rajesh Kumar Mallah" To: "asif ali" Subject: Re: VACUUM FULL does not works....... Cc: pgsql-performance@postgresql.org In-Reply-To: <325721.59076.qm@web58411.mail.re3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1165443208.3243.17.camel@state.g2switchworks.com> <325721.59076.qm@web58411.mail.re3.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/165 X-Sequence-Number: 22221 We have a view in our database. CREATE view public.hogs AS SELECT pg_stat_activity.procpid, pg_stat_activity.usename, pg_stat_activity.current_query FROM ONLY pg_stat_activity; Select current_query from public.hogs helps us to spot errant queries at times. regds mallah. On 12/7/06, asif ali wrote: > Thanks Scott, > It worked!!! > We killed an old idle running transaction, now everything is fine.. > > Thanks Again > asif ali > icrossing inc > > > Scott Marlowe wrote: > On Wed, 2006-12-06 at 15:53, asif ali wrote: > > Thanks Everybody for helping me out. > > I checked "pg_stat_activity"/pg_locks, but do not see any activity on > > the table. > > How to find a old running transaction... > > I saw this link, but it did not help.. > > > http://archives.postgresql.org/pgsql-hackers/2005-02/msg00760.php > > Sometimes just using top or ps will show you. > > on linux you can run top and then hit c for show command line and look > for ones that are IDLE > > Or, try ps: > > ps axw|grep postgres > > On my machine normally: > > 2408 ? S 0:00 /usr/local/pgsql/bin/postmaster -p 5432 -D > /home/postgres/data > 2615 ? S 0:00 postgres: stats buffer process > 2616 ? S 0:00 postgres: stats collector process > 2857 ? S 0:00 postgres: writer process > 2858 ? S 0:00 postgres: stats buffer process > 2859 ? S 0:00 postgres: stats collector process > > But with an idle transaction: > > 2408 ? S 0:00 /usr/local/pgsql/bin/postmaster -p 5432 -D > /home/postgres/data > 2615 ? S 0:00 postgres: stats buffer process > 2616 ? S 0:00 postgres: stats collector process > 2857 ? S 0:00 postgres: writer process > 2858 ? S 0:00 postgres: stats buffer process > 2859 ? S 0:00 postgres: stats collector process > 8679 ? S 0:00 postgres: smarlowe test [local] idle in transaction > > Thar she blows! > > Also, you can restart the database and vacuum it then too. Of course, > don't do that during regular business hours... > > ---------------------------(end of > broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings > > > > ________________________________ > Have a burning question? Go to Yahoo! Answers and get answers from real > people who know. > >