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 1qj8kY-009QRK-D3 for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Sep 2023 01:45:02 +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 1qj8kV-004rHA-Rl for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Sep 2023 01:44:59 +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 1qj8kV-004rGm-Gg for pgsql-hackers@lists.postgresql.org; Thu, 21 Sep 2023 01:44:59 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qj8kR-006Qeo-0S for pgsql-hackers@lists.postgresql.org; Thu, 21 Sep 2023 01:44:58 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id 2FD0260830 for ; Thu, 21 Sep 2023 10:44:49 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at oss.nttdata.com MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_eca4c72b63321a05ea7371ac9b761f89" Content-Transfer-Encoding: 7bit Date: Thu, 21 Sep 2023 10:44:49 +0900 From: Ryoga Yoshida To: pgsql-hackers@lists.postgresql.org Subject: Bug fix in vacuumdb --buffer-usage-limit xxx -Z User-Agent: Roundcube Webmail/1.4.11 Message-ID: <08930c0b541700a5264e5fbf3a685f5a@oss.nttdata.com> X-Sender: bt23yoshidar@oss.nttdata.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=_eca4c72b63321a05ea7371ac9b761f89 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Hi, When --buffer-usage-limit option is specified, vacuumdb issues VACUUM or VACUUM ANALYZE command with BUFFER_USAGE_LIMIT option. Also if --buffer-usage-limit and -Z options are specified, vacuumdb should issue ANALYZE command with BUFFER_USAGE_LIMIT option. But it does not. That is, vacuumdb -Z seems to fail to handle --buffer-usage-limit option. This seems a bug. You can see my patch in the attached file and how it works by adding -e option in vacuumdb. Ryoga Yoshida --=_eca4c72b63321a05ea7371ac9b761f89 Content-Transfer-Encoding: base64 Content-Type: text/x-diff; name=v1-0001-bug-fix-in-vacuumdb-buffer-usage-limit-Z.patch Content-Disposition: attachment; filename=v1-0001-bug-fix-in-vacuumdb-buffer-usage-limit-Z.patch; size=593 ZGlmZiAtLWdpdCBhL3NyYy9iaW4vc2NyaXB0cy92YWN1dW1kYi5jIGIvc3JjL2Jpbi9zY3JpcHRz L3ZhY3V1bWRiLmMKaW5kZXggZjAzZDViMWM2Yy4uNTczNTU2MzljMCAxMDA2NDQKLS0tIGEvc3Jj L2Jpbi9zY3JpcHRzL3ZhY3V1bWRiLmMKKysrIGIvc3JjL2Jpbi9zY3JpcHRzL3ZhY3V1bWRiLmMK QEAgLTk2NCw2ICs5NjQsMTMgQEAgcHJlcGFyZV92YWN1dW1fY29tbWFuZChQUUV4cEJ1ZmZlciBz cWwsIGludCBzZXJ2ZXJWZXJzaW9uLAogCQkJCWFwcGVuZFBRRXhwQnVmZmVyKHNxbCwgIiVzVkVS Qk9TRSIsIHNlcCk7CiAJCQkJc2VwID0gY29tbWE7CiAJCQl9CisJCQlpZiAodmFjb3B0cy0+YnVm ZmVyX3VzYWdlX2xpbWl0KQorCQkJeworCQkJCUFzc2VydChzZXJ2ZXJWZXJzaW9uID49IDE2MDAw MCk7CisJCQkJYXBwZW5kUFFFeHBCdWZmZXIoc3FsLCAiJXNCVUZGRVJfVVNBR0VfTElNSVQgJyVz JyIsIHNlcCwKKwkJCQkJCSAgdmFjb3B0cy0+YnVmZmVyX3VzYWdlX2xpbWl0KTsKKwkJCQlzZXAg PSBjb21tYTsKKwkJCX0KIAkJCWlmIChzZXAgIT0gcGFyZW4pCiAJCQkJYXBwZW5kUFFFeHBCdWZm ZXJDaGFyKHNxbCwgJyknKTsKIAkJfQo= --=_eca4c72b63321a05ea7371ac9b761f89--