Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sZBDA-00GvSp-Ck for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Jul 2024 15:25:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sZBD8-009IB9-MF for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Jul 2024 15:25:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sZBD8-009I6d-5t for pgsql-hackers@lists.postgresql.org; Wed, 31 Jul 2024 15:25:54 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sZBD2-002SNu-7G for pgsql-hackers@postgresql.org; Wed, 31 Jul 2024 15:25:53 +0000 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-368380828d6so3795918f8f.1 for ; Wed, 31 Jul 2024 08:25:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1722439547; x=1723044347; darn=postgresql.org; h=message-id:date:content-id:mime-version:comments:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=TJFvFmrGvSqMGBGMcsi9V08lrnzB2odDtHzGkgfzvmw=; b=Y68ZruCN2PgBZ9mcBr1thjGu7res8irnkgRU0mk4AkwNQGrWbXYIq64w8qfVfYq7bW wV1xMDi8GN1EBYKKniuAG9JG9wpKS+sCtSt8PQpz+lOjNmlOl/QlYr2bCQ5lo4hDbm7P BUs8egh6ZXSQlke10wQsOuvS2dD8GMtO7zaCMjxMJGojQQSwEu+YKfxi2VcYtdRzKJKh 8AtPHss7X2/tLEjduQn8nu3Cz4ngoJHbCTGOaX9cWJKno0Zttq8b+febnW+r2sBybBqk fq5oA1+rt+k5YMr6DGrBTh2SNsteMU4TxdyPF6O3FP5thLnu7EvZbnXD3oR346qXujxo Ta2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722439547; x=1723044347; h=message-id:date:content-id:mime-version:comments:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TJFvFmrGvSqMGBGMcsi9V08lrnzB2odDtHzGkgfzvmw=; b=GxDzKxUF0LCYtBHFoI/VDI0qRSY6LlChRhxmUE2HpjRAqMe6U8cgNF+uCZ0ZczgtFE 4fFBTsyX0xc+KhR/zGflx4iHO6Mx3b5J/olS7jT54NXiO6GEa3e8YFhrYPiLfQ2emfmk l60iu/sPrplmiolDgCSfm59tDvGJQI663uWQj4Px71Bz8dFxcfUafl/HWKQJlavsokdl S4kMYSyqobdyPhYMrF4pzVO5UO/3/kDNc7QnHGpKY3/HEqA7NRdrP61zHn5TYi+BAUHh Zc5TztwKByyXpzJH49bRDMNW2uEnjPtau+hEsZtdJelzM5LdZBK6FR7o+tVepDWaY45Y h7SA== X-Forwarded-Encrypted: i=1; AJvYcCUPUlNRPYgn9Q4ybXjTAjNscQl9xruI9WYz/oj3JdzivLifMdUd0LHRtGhrpYOCn8BPy2n6Xis4G850uBIPQ3Fiehom74VMJYlh4DaH X-Gm-Message-State: AOJu0YzzRm/uPPeIjPvirFHxH7+bwqQO4ay6IVOoGjVel9JXWr7ahH/d X9vF2i2IdVxc7fk/nNGCDvtRG2OITcfOOpDFHzBrj4vIjkC5dbVT32aQ60khFL4= X-Google-Smtp-Source: AGHT+IFdY5vztz9gZajHNnw6GT12p9vYi932QzFBcoO1OoQ0VftvT9MIACISs4yJ/k5UGUCWOxBmBg== X-Received: by 2002:a5d:52c5:0:b0:360:7c4b:58c3 with SMTP id ffacd0b85a97d-36b5d0c2df7mr8522271f8f.54.1722439546967; Wed, 31 Jul 2024 08:25:46 -0700 (PDT) Received: from antos (109-81-174-193.rct.o2.cz. [109.81.174.193]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b368622c3sm17297478f8f.100.2024.07.31.08.25.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jul 2024 08:25:46 -0700 (PDT) From: Antonin Houska To: Kirill Reshke cc: Alvaro Herrera , Pavel Stehule , Michael Paquier , PostgreSQL Hackers Subject: Re: why there is not VACUUM FULL CONCURRENTLY? In-reply-to: References: <202401301031.7viyzjhkmal4@alvherre.pgsql> Comments: In-reply-to Kirill Reshke message dated "Thu, 25 Jul 2024 15:02:28 +0500." X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.2.50 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16857.1722439545.1@antos> Date: Wed, 31 Jul 2024 17:25:45 +0200 Message-ID: <16859.1722439545@antos> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Kirill Reshke 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