pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rihad <rihad@mail.ru>
To: pgsql-general General <pgsql-general@postgresql.org>
Subject: Re: Recommendation to run vacuum FULL in parallel
Date: Wed, 3 Apr 2019 13:12:56 +0400
Message-ID: <9ed59ae2-6eb1-549d-eb05-d1546fd11515@mail.ru> (raw)

> Does *every* table have *so much* free space that it's impractical to 
> just
> let the files just get refilled by normal usage?
>
Ideally VACUUM FULL should not require a giant lock on the table.

Sometimes a table's usage pattern involves much more updates than 
inserts, which gradually uses more and more unused space that is never 
used again by postgres, and plain autovacuuming doesn't return it to the 
OS. So DB size (as witnessed by psql's \l+) uses 5-6x times the space it 
actually needs. And using vacuum full is prohibitive because of the 
exclusive lock it takes on the table, preventing both writes and reads. 
Since rewriting a table is a completely internal operation from clients' 
POV, hopefully one day we will see a concurrent version of vacuum full.






view thread (17+ messages)  latest in thread

Message-ID: <9ed59ae2-6eb1-549d-eb05-d1546fd11515@mail.ru>
Permalink:  ../9ed59ae2-6eb1-549d-eb05-d1546fd11515@mail.ru/
Also on:    postgresql.org/message-id/9ed59ae2-6eb1-549d-eb05-d1546fd11515@mail.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: rihad@mail.ru
  Subject: Re: Recommendation to run vacuum FULL in parallel
  In-Reply-To: <9ed59ae2-6eb1-549d-eb05-d1546fd11515@mail.ru>
  References: <9ed59ae2-6eb1-549d-eb05-d1546fd11515@mail.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox