473,889 Members | 2,192 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Repeated VACUUM reports same number of deleted rows

Postgresql 7.4.5

The following VACUUMs were run within a couple of minutes of each other completing.
This table concerned is a table that has not been changed in a long time. (a month)

There were open transactions at the time the vacuum was run. These were created by having PHP running with
postgresql. At least that is what I have managed to find so far. and disabling PHP in apache removes them.

postgres 7588 0.0 0.4 50324 3168 ? S Sep28 0:00 postgres: postgres sqlfilter 10.0.0.5 idle in transaction
postgres 7589 0.0 0.4 50324 3172 ? S Sep28 0:00 postgres: postgres sqlfilter 10.0.0.5 idle in transaction

Should VACUUM report the rows as deleted or say they could not be deleted?
Why does it report the same information for three runs in a row?

Or is something else going on that I don't understand.

Regards

Russell Smith
sqlfilter=# vacuum verbose filter.access_l og_big
sqlfilter-# ;
INFO: vacuuming "filter.access_ log_big"
INFO: index "access_log_url " now contains 5159204 row versions in 74984 pages
DETAIL: 21455 index pages have been deleted, 20000 are currently reusable.
CPU 5.16s/0.69u sec elapsed 650.85 sec.
INFO: index "access_log_whe nwho" now contains 5159204 row versions in 58292 pages
DETAIL: 0 index pages have been deleted, 0 are currently reusable.
CPU 5.39s/0.68u sec elapsed 615.43 sec.
INFO: index "access_log_tim e" now contains 5159204 row versions in 38063 pages
DETAIL: 0 index pages have been deleted, 0 are currently reusable.
CPU 3.34s/0.46u sec elapsed 259.59 sec.
INFO: index "accesslogbig_d omain" now contains 5159204 row versions in 25501 pages
DETAIL: 0 index pages have been deleted, 0 are currently reusable.
CPU 2.17s/0.24u sec elapsed 56.53 sec.
INFO: "access_log_big ": found 0 removable, 5159204 nonremovable row versions in 175418 pages
DETAIL: 0 dead row versions cannot be removed yet.
There were 19262 unused item pointers.
0 pages are entirely empty.
CPU 21.06s/2.60u sec elapsed 1662.62 sec.
VACUUM
Time: 1662627.077 ms
sqlfilter=# vacuum verbose filter.access_l og_big;
INFO: vacuuming "filter.access_ log_big"
INFO: index "access_log_url " now contains 5159204 row versions in 74984 pages
DETAIL: 21455 index pages have been deleted, 20000 are currently reusable.
CPU 5.57s/0.64u sec elapsed 655.85 sec.
INFO: index "access_log_whe nwho" now contains 5159204 row versions in 58292 pages
DETAIL: 0 index pages have been deleted, 0 are currently reusable.
CPU 5.54s/0.52u sec elapsed 589.95 sec.
INFO: index "access_log_tim e" now contains 5159204 row versions in 38063 pages
DETAIL: 0 index pages have been deleted, 0 are currently reusable.
CPU 3.30s/0.38u sec elapsed 262.43 sec.
INFO: index "accesslogbig_d omain" now contains 5159204 row versions in 25501 pages
DETAIL: 0 index pages have been deleted, 0 are currently reusable.
CPU 2.37s/0.20u sec elapsed 54.98 sec.
INFO: "access_log_big ": found 0 removable, 5159204 nonremovable row versions in 175418 pages
DETAIL: 0 dead row versions cannot be removed yet.
There were 19262 unused item pointers.
0 pages are entirely empty.
CPU 21.20s/2.36u sec elapsed 1647.25 sec.
VACUUM
Time: 1647292.681 ms
sqlfilter=# commit;
WARNING: there is no transaction in progress
COMMIT
Time: 47.537 ms
sqlfilter=# vacuum verbose filter.access_l og_big;
INFO: vacuuming "filter.access_ log_big"
INFO: index "access_log_url " now contains 5159204 row versions in 74984 pages
DETAIL: 21455 index pages have been deleted, 20000 are currently reusable.
CPU 4.95s/0.68u sec elapsed 648.90 sec.
INFO: index "access_log_whe nwho" now contains 5159204 row versions in 58292 pages
DETAIL: 0 index pages have been deleted, 0 are currently reusable.
CPU 5.29s/0.68u sec elapsed 605.39 sec.
INFO: index "access_log_tim e" now contains 5159204 row versions in 38063 pages
DETAIL: 0 index pages have been deleted, 0 are currently reusable.
CPU 3.58s/0.42u sec elapsed 250.08 sec.
INFO: index "accesslogbig_d omain" now contains 5159204 row versions in 25501 pages
DETAIL: 0 index pages have been deleted, 0 are currently reusable.
CPU 2.13s/0.29u sec elapsed 55.05 sec.
INFO: "access_log_big ": found 0 removable, 5159204 nonremovable row versions in 175418 pages
DETAIL: 0 dead row versions cannot be removed yet.
There were 19262 unused item pointers.
0 pages are entirely empty.
CPU 20.89s/2.58u sec elapsed 1658.31 sec.
VACUUM
Time: 1658431.580 ms

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #1
2 2548
Russell Smith <mr*****@pws.co m.au> writes:
Should VACUUM report the rows as deleted or say they could not be deleted?
Why does it report the same information for three runs in a row?
I see no pending deletions in that vacuum output:
DETAIL: 0 dead row versions cannot be removed yet.


so I'm not sure why you would expect the output to change.

regards, tom lane

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

http://archives.postgresql.org

Nov 23 '05 #2
On Sat, 2 Oct 2004 12:42 am, Tom Lane wrote:
Russell Smith <mr*****@pws.co m.au> writes:
Should VACUUM report the rows as deleted or say they could not be deleted?
Why does it report the same information for three runs in a row?
I see no pending deletions in that vacuum output:
DETAIL: 0 dead row versions cannot be removed yet.


INFO: *vacuuming "filter.access_ log_big"
INFO: *index "access_log_url " now contains 5159204 row versions in 74984 pages
DETAIL: *21455 index pages have been deleted, 20000 are currently reusable.

I expect that index info not to be the same each vacuum run. Why are 21455index pages deleted
on runs 1, 2 and 3.
so I'm not sure why you would expect the output to change.

regards, tom lane

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

http://archives.postgresql.org



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

http://archives.postgresql.org

Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
3188
by: Stephen | last post by:
Hello, Is it normal for plain VACUUM on large table to degrade performance by over 9 times? My database becomes unusable when VACUUM runs. From reading newsgroups, I thought VACUUM should only slow down by 10% to 15%. Other MVCC databases like MySQL InnoDB can even VACUUM discretely (runs internally). Is it my Linux system or is it PostgreSQL? The database is mostly read-only. There are 133,000 rows and each row is about 2.5kB in size...
8
4615
by: Sean Shanny | last post by:
To all, The facts: PostgreSQL 7.4.0 running on BSD 5.1 on Dell 2650 with 4GB RAM, 5 SCSI drives in hardware RAID 0 configuration. Database size with indexes is currently 122GB. DB size before we completed the vacuum full was 150GB. We have recently done a major update to a table, f_pageviews, in our data warehouse. The f_pageviews table contains about 118 million rows.
5
7193
by: Gavin Scott | last post by:
Hi, I'm having a performance problem with a large database table we use with postgres 7.3.4. The table is: db=> \d log Table "public.log" Column | Type | Modifiers ---------+----------+----------- hid | integer |
0
1725
by: Jim Seymour | last post by:
Hi, Environment: PostgreSQL 7.4.2 Locally built with GCC 3.3.1 Solaris 8 (Sparc) I have a relatively simple database created with...
15
2392
by: Ed L. | last post by:
If I see VACUUM ANALYZE VERBOSE output like this... INFO: --Relation public.foo-- INFO: Index idx_foo_bar: Pages 219213; Tuples 28007: Deleted 9434. CPU 17.05s/4.58u sec elapsed 3227.62 sec. ....am I correct in reading this to say that it took more than 53 minutes (3227 secs) to get 17 seconds of CPU time? Is this an indicator of possible I/O contention? What else would account for this if my CPUs are clearly not very busy?
4
1374
by: Ed L. | last post by:
I am trying to better understand diskspace leakage and the relationship to vacuum, max_fsm_pages, and max_fsm_relations. Below are 3 snippets from 3 successive vacuums on a table with ~284K rows which receives many many UPDATEs and a few INSERTs (there were also a few runs of ANALYZE in between these VACUUMs): INFO: Pages 22652: Changed 4, Empty 0; Tup 284139: Vac 927, Keep 0, UnUsed 936. INFO: Pages 22652: Changed 7, Empty 0; Tup...
1
1472
by: Klint Gore | last post by:
query is select t2.field4, t1.* from t1 left outer join t2 on t2.field1 = t1.field1 and t2.field2 = t1.field2 There are 55k rows in t1 (103 fields) and 10k in t2 (4 fields, 4 is text). before vacuum analyze the query gave 10k rows like it was doing an inner join. after vacuum analyze gave the full 55k.
1
1838
by: yateen joshi | last post by:
Hi , I am developing a script that will delete old data from various tables in a database periodically. The script deletes data from all the tables, one by one, in single go. I have two options of running vacuum here - One is to run vacuum analyze each time the table data is deleted, or another is to run vacuum analyze after the data is deleted from all the tables. Please note that data has been deleted from all the tables and not...
1
2063
by: G. Thomas Yagel, Jr. | last post by:
I have a postgresql database into which I inserted about 40 million records over a 12 hour period. I did not perform any updates or deleletes on the records. After 12 hours I stopped inserting recods and started a "vacuum verbose". The vacuuming has taken almost 2 hours now and is not even finished. What I don't understand is why there is so much vacuuming to be done on some tables that are only being inserted into. As an example, I...
0
9961
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9802
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10439
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9597
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7148
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6015
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4248
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3252
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.