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 1sZlTr-003ZA7-Vd for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Aug 2024 06:09:36 +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 1sZlTp-00FUKr-Nt for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Aug 2024 06:09:33 +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 1sZlTp-00FUK3-9c for pgsql-hackers@lists.postgresql.org; Fri, 02 Aug 2024 06:09:33 +0000 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sZlTm-002jCE-CV for pgsql-hackers@postgresql.org; Fri, 02 Aug 2024 06:09:32 +0000 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a7ac469e4c4so518716366b.0 for ; Thu, 01 Aug 2024 23:09:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1722578968; x=1723183768; darn=postgresql.org; h=message-id:date:content-transfer-encoding:content-id:mime-version :comments:references:in-reply-to:subject:cc:to:from:from:to:cc :subject:date:message-id:reply-to; bh=WggANS6aOjnB65s4ec7X5zdM5pmAA0vCM8pyHs0RK6A=; b=RKmwX7Eg0YipO4p/yNUc41/C87cJqH0FJnCd8uK5jp5s8KN4ZJs8KbJGMUKSjgg8yp O4K44bT9RvSCA6+z9wzYqCkDpyh7aswh/o9qOlPGHiTkckB3HTBFl5Mjd3nGi7xoSNQo bT7txPumgR6bu++T4ySnJEMMOvLEU+KJt6ftxMVJzU+E7CTwbSS2y/4+EGRxy5p2HIOP sQ4ImsKC/jDtMuee6e2beCvczau3A0hIMBelEYstZ+4N+CtjoZhXPk/aM2y8ApCKt6FY +TSHTvCLE5BgX3O9Kn+JGVZzx2lGTPEg6icvdLvTc992JsVdBV5vgb5SqgLK5Q/opQt1 XOug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722578968; x=1723183768; h=message-id:date:content-transfer-encoding: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=WggANS6aOjnB65s4ec7X5zdM5pmAA0vCM8pyHs0RK6A=; b=ugNlHbkaSSqDewTL53UASKFTv/r/HMqaqDiaVZH0LdqXw/QhJL5Kpd6/y62wQxaEFA RYi6j4dYFsqn0QZKUISe4gpPQX5KWbuEllw6ubnPtuWpaAJqdtgzbV7v9KUTh80ivacQ OQZlo4BZ8MzSV82VP1mXcz12dp2wO87F3X/R0Gi2OR4wwB0/Mh7KlKI2s1K1V/o8BNw4 cqT4swJ5VDjiFbxfWWYZwd57hFOeD963nFNpk1TNrx3iO7Zdt6tdlg1A0KNAM+Sjiu81 6QAur/v/spmMBZKSeruvpJp0IAORzETToyCNlz4vqIKD65dMCFVaK8nk9LwG3J2BpK1Y jD3Q== X-Forwarded-Encrypted: i=1; AJvYcCVNWr9RH+UaHZy+jS+YhX6nFr09y+kSzMkpO2O8X2e+1UpvFZ/Byu8n6gCJF1oerMsjcuu3+fs/YbaCKoVm9a6B155KYljuQr+pU+99 X-Gm-Message-State: AOJu0YwZOs1f9SANFoAszmso2i2NxMzuFMVS92zK+UtRVuXsEA50Ks86 DNA8jOaYtOS76xWiwZTKGxxorXrFlgXwp20FN6kYFBF5xx73CuMfaElTk0KcBik= X-Google-Smtp-Source: AGHT+IHQsyGKF571mRPEz/WdofosR0ycfrVqBCntbnWxM7Re2b7yQihHBkDEPRcyuW3h4usONqeBYA== X-Received: by 2002:a17:907:d8a:b0:a77:c051:36a9 with SMTP id a640c23a62f3a-a7dc5fb4baamr201864266b.9.1722578967776; Thu, 01 Aug 2024 23:09:27 -0700 (PDT) Received: from antos (109-81-174-193.rct.o2.cz. [109.81.174.193]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9bc3cd0sm59423766b.11.2024.08.01.23.09.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 23:09:27 -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: <202401311004.2yky72qydzxn@alvherre.pgsql> <82651.1720540558@antos> Comments: In-reply-to Kirill Reshke message dated "Sun, 21 Jul 2024 20:13:11 +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: <1787.1722578966.1@antos> Content-Transfer-Encoding: quoted-printable Date: Fri, 02 Aug 2024 08:09:26 +0200 Message-ID: <1788.1722578966@antos> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Kirill Reshke wrote: > What is the size of the biggest relation successfully vacuumed > via pg_squeeze? > Looks like in case of big relartion or high insertion load, > replication may lag and never catch up... Users reports problems rather than successes, so I don't know. 400 GB was reported in [1] but it's possible that the table size for this test was determined based on available disk space. I think that the amount of data changes performed during the "squeezing" matters more than the table size. In [2] one user reported "thounsands of UPSERTs per second", but the amount of data also depends on row size, whic= h he didn't mention. pg_squeeze gives up if it fails to catch up a few times. The first version= of my patch does not check this, I'll add the corresponding code in the next version. > However, in general, the 3rd patch is really big, very hard to > comprehend. Please consider splitting this into smaller (and > reviewable) pieces. I'll try to move some preparation steps into separate diffs, but not sure = if that will make the main diff much smaller. I prefer self-contained patches= , as also explained in [3]. > Also, we obviously need more tests on this. Both tap-test and > regression tests I suppose. Sure. The next version will use the injection points to test if "concurren= t data changes" are processed correctly. > One more thing is about pg_squeeze background workers. They act in an > autovacuum-like fashion, aren't they? Maybe we can support this kind > of relation processing in core too? Maybe later. Even just adding the CONCURRENTLY option to CLUSTER and VACUU= M FULL requires quite some effort. [1] https://github.com/cybertec-postgresql/pg_squeeze/issues/51 [2] https://github.com/cybertec-postgresql/pg_squeeze/issues/21#issuecomment-5= 14495369 [3] http://peter.eisentraut.org/blog/2024/05/14/when-to-split-patches-for-= postgresql -- = Antonin Houska Web: https://www.cybertec-postgresql.com