Re: Postgresql | Vacuum information

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Sohel Tamboli <sohel(dot)tamboli0016(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Postgresql | Vacuum information
Date: 2018-02-28 18:37:41
Message-ID: CAKFQuwZ_HPmv6pue1fzMKakUWhaowg2_y5OEjoWaB=LeEb5TRA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Feb 28, 2018 at 11:31 AM, Sohel Tamboli <sohel(dot)tamboli0016(at)gmail(dot)com
> wrote:

> Hi,
>
> I need some information on vacuum in postgresql. I know that "vacuum full"
> recreate full table and releases space to OS. Only "vacuum" clears the dead
> tuples and free the space but does not returns free space to OS, indeed it
> keeps free space as a part of table.
> My question is, after running only "vacuum", how does new data or insert
> is written to the table? I need to know that Does new data gets inserted in
> free space available in between of live tuples or gets inserted at the end
> of table everytime.
>
>
There would be no point to non-full vacuuming if "new data [was] inserted
... at the end of the table everytime"...​

​This logic is also documented:​


https://www.postgresql.org/docs/10/static/routine-vacuuming.html#VACUUM-BASICS

​"
The space it occupies must then be reclaimed for reuse by new rows, to
avoid unbounded growth of disk space requirements. This is done by running
VACUUM.
​"​

​David J.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Keith 2018-02-28 18:41:29 Re: Separate log for a specfic database
Previous Message Sohel Tamboli 2018-02-28 18:31:23 Postgresql | Vacuum information