1

Sometimes I find it difficult to understand postgreSQL documentation.

Now, VACCUM section (https://www.postgresql.org/docs/10/sql-vacuum.html) says this phrase "Aggressive freezing is always performed when the table is rewritten".

Does this phrase mean that VACUUM FREEZE does the same as FULL?

2
  • @basha04, I have seen it. The phrase from the documentation is that that I cannot understand.. Could you possibly clarify it for me?
    – George K
    Sep 6, 2021 at 14:27
  • @basha04. Well if set some experiments it turns out that execution time of FULL and FREEZE is completely diferrent - it always takes long to execute FULL and FREEZE executes instantly. That is why I have the question - "what does 'when the table is rewritten'" mean!?
    – George K
    Sep 6, 2021 at 16:08

1 Answer 1

1

No, that means that when you run VACUUM (FULL), FREEZE is automatically implied.

As the documentation that you quote says:

VACUUM FULL rewrites the entire contents of the table into a new disk file with no extra space, allowing unused space to be returned to the operating system.

3
  • "when the table is rewritten" - does it mean that the table gets rebuilt?
    – George K
    Sep 6, 2021 at 16:55
  • Yes, during VACUUM (FULL). See the additional quotation I added to the answer. Sep 7, 2021 at 2:45
  • 1
    Only now I have come to understand that I misinterpreted the docs. The quote of VACCUM FREEZE is "Selects aggressive “freezing” of tuples. Specifying FREEZE is equivalent to performing VACUUM with the vacuum_freeze_min_age and vacuum_freeze_table_age parameters set to zero. Aggressive freezing is always performed when the table is rewritten, so this option is redundant when FULL is specified." The third sentence here is all about the FULL option, and I thought it's about the FREEZE itself.... @Laurenz, thanks again for your answer.
    – George K
    Sep 7, 2021 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.