473,412 Members | 2,054 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

autovacuum problems

I've been running pg_autovacuum for a week or so, now and while I like
it I'm having trouble trusting it.

I have several small (~0-50 record) working tables that have high
insert/update/delete activity. When I first set up pg_autovacuum they
were being vacuumed every ~1-4 hours during the day and less often at
night. Most of the time the tuple count was reasonable.

Now these tables haven't been vacuumed for a couple of days although
the activity on them hasn't changed.

What has changed is that pg_autovacuum reports that the tuple count is
(actually, was at last vacuum) over 12,000 where it is actually more
like 16 so the next vacuum won't happen for quite a while. 12,000+ is
an unreasonable tuple count - it would represent several week's
activity happening at once.

This has happened to at least two working tables. I'm currently
running it as:
pg_autovacuum -d 2 >> autovacuum.log 2>&1 &

I have also encountered another oddity. If I run pg_autovacuum with
all defaults then it appears to analyze every table in every database
every pass.

Any ideas? My searches have turned up nothing useful. Version is
7.4.1.

Cheers,
Steve

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #1
1 2018
On Mon, 2004-08-02 at 18:56, Steve Crawford wrote:
I have several small (~0-50 record) working tables that have high
insert/update/delete activity. When I first set up pg_autovacuum they
were being vacuumed every ~1-4 hours during the day and less often at
night. Most of the time the tuple count was reasonable.

Now these tables haven't been vacuumed for a couple of days although
the activity on them hasn't changed.

What has changed is that pg_autovacuum reports that the tuple count is
(actually, was at last vacuum) over 12,000 where it is actually more
like 16 so the next vacuum won't happen for quite a while. 12,000+ is
an unreasonable tuple count - it would represent several week's
activity happening at once.

This has happened to at least two working tables. I'm currently
running it as:
pg_autovacuum -d 2 >> autovacuum.log 2>&1 &
My first guess is that autovacuum is being misled by a bad reltuples
value in pg_class, I know that the sampling method used by ANALYZE to
estimate the tuple count has been improved in CVS, so it's possible that
pg_autovacuum performed an analyze which set reltuples too high.
I have also encountered another oddity. If I run pg_autovacuum with
all defaults then it appears to analyze every table in every database
every pass.

Any ideas? My searches have turned up nothing useful. Version is
7.4.1.


There were several bug fixes for pg_autovacuum in both 7.4.2 and 7.4.3
so I would suggest upgrading to 7.4.3 or least pulling pg_autovacuum.c
and .h from 7.4 CVS branch and compile it for yourself, which ever is
easier. If you still have this problem after upgrading to 7.4.3 please
let me know.
Matthew

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #2

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

Similar topics

14
by: Jim Hubbard | last post by:
Are you up to speed on the difficulties in using the 1.1 .Net framework? Not if you are unaware of the 1,596 issues listed at KBAlertz (http://www.kbalertz.com/technology_3.aspx). If you are...
1
by: 3f | last post by:
Hello; We have made a web application that people can download from our web site and installed on: Windows XP Windows 2000 Professional Windows 2003 Server Windows 2000 Server
1
by: Socketd | last post by:
Hi all Will autovacuum both VACUUM and ANALYZE all databases, so that I can delete my script which runs daily: "vacuumdb -a -z"? br socketd (a Postgresql newbie) ps: Please cc to me as I...
5
by: Corky | last post by:
This works: db2 SELECT DISTINCT PROBLEM_OBJECTS.PROBLEM_ID FROM PROBLEM_OBJECTS INNER JOIN PROBLEMS ON PROBLEM_OBJECTS.PROBLEM_ID = PROBLEMS.PROBLEM_ID WHERE INTEGER(DAYS(CURRENT DATE) -...
10
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ...
3
by: Carlos | last post by:
Hello Forum, I would appreciate it if you could recommend settings to use auto-vacuum in my version 7.4 database. I am uploading several thousands records in the database at a rate of ~1 second...
0
by: Sim Zacks | last post by:
I reconfigured the redhat startup script for postgresql to work with version 8 and that is working fine. I thought I could put autovacuum in the startup script and that didn't cause any problems,...
0
by: Sergistm | last post by:
Hello World, :D I have a problem that it is making me crazy, I hope you can help me. I'm trying to execute a .exe file with the Procces.Start, and there is no problem when the file is on my...
0
by: Assyst | last post by:
Hi All, Nice to come back after a long time o the Scipts Forum , Now Can any body tell me 1 . Steps to sctivate the AUTOVACUUM thread ? 2 . Can we believe the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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,...
0
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...

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.