Re: VACUUM technical question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Algolist <algolist(at)manual(dot)ru>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: VACUUM technical question
Date: 2004-07-01 21:20:26
Message-ID: 5857.1088716826@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ilia Kantor <algolist(at)manual(dot)ru> writes:
> How does it manage to reduce file size without any locks ?

It doesn't. The file can only be shortened while holding
AccessExclusiveLock (otherwise we could cause serious problems for
concurrent seqscans). VACUUM FULL has such a lock anyway,
plain VACUUM only tries to truncate if it can acquire such
a lock for a short time at the end of the VACUUM run.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message wespvp 2004-07-01 21:25:35 Re: max_fsm_pages
Previous Message Alexander Cohen 2004-07-01 21:09:23 row level grants