Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8807873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:28:32+00:00 2026-06-14T02:28:32+00:00

I am just going through one scenario, where I am not at all getting

  • 0

I am just going through one scenario, where I am not at all getting the clue for my issue.

I have one table called names (with columns name and time). This table is being inserted numerous number of rows at every mins. And these inserted record would be deleted on particular time interval. So, finally I stopped inserting the data and deleted all the rows from the table.

My database version details

impss=# SELECT  version();
                                           version                                            
----------------------------------------------------------------------------------------------
 PostgreSQL 8.3.7 on i486-pc-linux-gnu, compiled by GCC gcc-4.3.real (Debian 4.3.2-1.1) 4.3.2
(1 row)

But when I issue the query for finding the size of the table, I still get some size.

impss=# SELECT  pg_size_pretty( pg_total_relation_size('names')) ;
 pg_size_pretty 
----------------
 1504 kB
(1 row)

First Question why still it shows some size though I have deleted all the records from the table.

To find when last autovacuum was done I have issued following query:

Current Time is

impss=# select now(); 
               now                
----------------------------------
 2012-11-08 20:21:10.550434+05:30
(1 row)

impss=# SELECT last_autovacuum  from pg_stat_user_tables where relname='names';
         last_autovacuum          
----------------------------------
 2012-11-08 17:51:31.995618+05:30

Second question: Why has the autovacuum process has not been performed after this time although my database is not a busy one and I have already stopped all my transactions towards this table.

So, please tell me whether I have to do any specific configuration to do the frequent vacuum so that I could get back all my space once records get deleted.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T02:28:34+00:00Added an answer on June 14, 2026 at 2:28 am

    first query – autovacuum doesn’t invoke VACUUM FULL – so it has not impact on relation size (usually, but it can trim relation file from end to last living tuple when there are no other requests for access to relation at moment of vacuum execution), second query – autovacuum is executed when autovacuum_vacuum_threshold rows are modified and modified rows / all rows is higher to autovacuum_vacuum_scale_factor. Both these values are in postgresql.conf and default values is 50 rows and 20%.

    Autovacuum execution doesn’t depend on current database load – it depends only on number of updated/deleted rows.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was just going through all the Mathematical stuff which is used in programming.
Okay, I am going to go through ALL my steps thus far just so
I am just trying to learn some Perl, so I am going through one
We have been going through a big memory leak analysis and have found one
I was just going through one of DavidHayden's articles on Hashing User Passwords .
I was just going through one code used to draw one chart. This code
I'm just going through the MVC tutorials on asp.net, ( this one ). I
I was just going through this old rails cast episode, and one thing it
If I only have one row that I'm getting through $sql = mysql_query(SELECT id,user,comments
I was just going through the new MVC Music Store tutorial at asp.net. One

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.