Table with no DELETE or UPDATE operations needs VACUUM?
Table with no DELETE or UPDATE operations needs VACUUM?
Documentation says:
VACUUM reclaims storage occupied by dead tuples. In normal PostgreSQL operation, tuples that are deleted or obsoleted by an update are not physically removed from their table; they remain present until a VACUUM is done.
I have table with ~ 50 000 INSERT
and much more SELECT
operations per day, but there is no DELETE
or UPDATE
operations at all on this table.
INSERT
SELECT
DELETE
UPDATE
Question is: do I need periodically VACUUM
for this table? or in this particular case, this no makes sense at all?
VACUUM
1 Answer
1
The only reason why such a table needs to be vacuumed is to freeze tuples (mark them as permanently valid) so that they don't disappear when the transaction counter wraps around.
This has to happen only once for each tuple.
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy