Re: VACUUM technical question - Mailing list pgsql-general

From Tom Lane
Subject Re: VACUUM technical question
Date
Msg-id 5857.1088716826@sss.pgh.pa.us
Whole thread Raw
In response to VACUUM technical question  (Ilia Kantor <algolist@manual.ru>)
List pgsql-general
Ilia Kantor <algolist@manual.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

pgsql-general by date:

Previous
From:
Date:
Subject: Re: max_fsm_pages
Next
From: "Glen Parker"
Date:
Subject: Re: postgresql +AMD64 +big address spaces - does it work?