Re: vacuum vs vacuum full - Mailing list pgsql-general

From Olivier Gautherot
Subject Re: vacuum vs vacuum full
Date
Msg-id CAJ7S9TWGN01KhO636AWFUVtEFqMkRtf6qaPH6B9VkaN_4spORg@mail.gmail.com
Whole thread Raw
In response to vacuum vs vacuum full  (Atul Kumar <akumar14871@gmail.com>)
Responses Re: vacuum vs vacuum full  (Ron <ronljohnsonjr@gmail.com>)
List pgsql-general
Hi Atul,

On Wed, Nov 18, 2020 at 9:33 AM Atul Kumar <akumar14871@gmail.com> wrote:
Hi,

We have a table of 3113GB, and we are planning to vacuum it in non
business hours i.e. 12AM to 4AM, So my queries are:

1. What should be perform on the table Vacuum or Vacuum full ?

Vacuum full will do a complete rewrite of the table so you need to make sure that you have the necessary space. I would recommend a simple VACUUM, although it won't return the extra space to the OS.
 
2. Do we need to perform Analyze also?

It would be a good thing.
 
3. Will the operation be completed in the given time frame? how to
check the same.

Given the size of the table, it will probably take several days.
 
4. Who acquire lock on table vacuum or vacuum full.

VACUUM FULL acquires a lock on the table. VACUUM doesn't.
 
5. If the activity goes beyond time frame, do we have any option to do
continue doing t without acquiring lock on the table ?

VACUUM is a background activity. It does not block any other activity.
 

If you also need the structure of the table, Please let me know.

It would be interesting to know the number of rows updated per hour or per day to have an estimation of the needs.
 
Please help me by responding my query wise.

Regards,
Atul

Cheers
Olivier
 

Libre de virus. www.avast.com

pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: vacuum vs vacuum full
Next
From: Ron
Date:
Subject: Re: vacuum vs vacuum full