agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
From: Antonin Houska <ah@cybertec.at>
To: Kirill Reshke <reshkekirill@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: why there is not VACUUM FULL CONCURRENTLY?
Date: Wed, 31 Jul 2024 17:25:45 +0200
Message-ID: <16859.1722439545@antos> (raw)
In-Reply-To: <CALdSSPg=9Y9sZMymieZoxOT0saVOOhBHv=UfXCjRAZmzDCYzzw@mail.gmail.com>
References: <CAFj8pRDNDOrg90hLMmbo_hiWpgBm+73gmWMRUHRkTKwrGnvYJQ@mail.gmail.com>
	<202401301031.7viyzjhkmal4@alvherre.pgsql>
	<CALdSSPg=9Y9sZMymieZoxOT0saVOOhBHv=UfXCjRAZmzDCYzzw@mail.gmail.com>

Kirill Reshke <reshkekirill@gmail.com> wrote:

> Also, I was thinking about pg_repack vs pg_squeeze being used for the
> VACUUM FULL CONCURRENTLY feature, and I'm a bit suspicious about the
> latter.

> If I understand correctly, we essentially parse the whole WAL to
> obtain info about one particular relation changes. That may be a big
> overhead,

pg_squeeze is an extension but the logical decoding is performed by the core,
so there is no way to ensure that data changes of the "other tables" are not
decoded. However, it might be possible if we integrate the functionality into
the core. I'll consider doing so in the next version of [1].

> whereas the trigger approach does not suffer from this. So, there is the
> chance that VACUUM FULL CONCURRENTLY will never keep up with vacuumed
> relation changes. Am I right?

Perhaps it can happen, but note that trigger processing is also not free and
that in this case the cost is paid by the applications. So while VACUUM FULL
CONCURRENTLY (based on logical decoding) might fail to catch-up, the trigger
based solution may slow down the applications that execute DML commands while
the table is being rewritten.

[1] https://commitfest.postgresql.org/49/5117/

-- 
Antonin Houska
Web: https://www.cybertec-postgresql.com





view thread (88+ messages)  latest in thread

Message-ID: <16859.1722439545@antos>
Permalink:  ../16859.1722439545@antos/
Also on:    postgresql.org/message-id/16859.1722439545@antos

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: pgsql-hackers@postgresql.org
  Cc: ah@cybertec.at, reshkekirill@gmail.com, alvherre@alvh.no-ip.org, pavel.stehule@gmail.com, michael@paquier.xyz
  Subject: Re: why there is not VACUUM FULL CONCURRENTLY?
  In-Reply-To: <16859.1722439545@antos>

* 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