public inbox for [email protected]  
help / color / mirror / Atom feed
From: Bartosz Stalewski <[email protected]>
To: [email protected]
Subject: Vacuum related question
Date: Fri, 7 Mar 2025 12:16:38 +0100
Message-ID: <CAE0uZgfFxgpNjC1t6zOict9hXi9=6S3zAmfpV+Xe-ZTBWJbCew@mail.gmail.com> (raw)

Hello All!

I'm currently using 17.2 version and working on optimizing vacuums.
I would be greateful if you could confirm (or deny) my idea.

Current situation:
Every 4-5 days vacuum to prevent wraparound is running in my DB, which of
course is bad. There are a few tables that are constantly being updated
(both inserts and updates) - they are quite big - ranging from a few
hundred million to over a billion rows.
Other tables get only inserts (with similar size - they may reach over a
billion rows).

Solution:
I would like to have a quick vacuum to freeze old tuples - it would be
quick because it would omit indexes (because switch INDEX_CLEANUP would be
set as false). Additionally for tables with dead tuples I would run vacuum
with INDEX_CLEANUP set as true during weekend. Omitting indexes makes a
huge difference in terms of vacuum time.

Would it be a problem from performance point of view (e.g. accumulating
some bloat?) if tables that do not contain dead tuples are vacuumed only
with flag INDEX_CLEANUP set as false? I have a feeling that it is fine, but
unfortunately I couldn't find any clear evidence when browsing Internet.

Thanks in advance,
Bartek


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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Vacuum related question
  In-Reply-To: <CAE0uZgfFxgpNjC1t6zOict9hXi9=6S3zAmfpV+Xe-ZTBWJbCew@mail.gmail.com>

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

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