Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXgcc-0002XR-I3 for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Oct 2021 09:20:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mXgcb-0000Jp-76 for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Oct 2021 09:20:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXgca-0000Iu-VP for pgsql-hackers@lists.postgresql.org; Tue, 05 Oct 2021 09:20:24 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXgcT-0000hc-37 for pgsql-hackers@lists.postgresql.org; Tue, 05 Oct 2021 09:20:23 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id 3D65460620 for ; Tue, 5 Oct 2021 18:20:11 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.3 at oss.nttdata.com MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_bfde2a778fc13971939bfd2cbd83f6b4" Content-Transfer-Encoding: 8bit Date: Tue, 05 Oct 2021 18:20:11 +0900 From: bt21tanigaway To: pgsql-hackers@lists.postgresql.org Subject: Fix pg_log_backend_memory_contexts() 's delay User-Agent: Roundcube Webmail/1.4.11 Message-ID: <0aae3e074face409b35153451be5cc11@oss.nttdata.com> X-Sender: bt21tanigaway@oss.nttdata.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=_bfde2a778fc13971939bfd2cbd83f6b4 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8; format=flowed Hi, Log output takes time between several seconds to a few tens when using ‘SELECT pg_log_backend_memory_contexts(1234)’ with PID of ‘autovacuum launcher’. I made a patch for this problem. regards, Koyu Tanigawa --=_bfde2a778fc13971939bfd2cbd83f6b4 Content-Transfer-Encoding: base64 Content-Type: text/x-diff; name=fix_log_output_delay.patch Content-Disposition: attachment; filename=fix_log_output_delay.patch; size=506 ZGlmZiAtLWdpdCBhL3NyYy9iYWNrZW5kL3Bvc3RtYXN0ZXIvYXV0b3ZhY3V1bS5jIGIvc3JjL2Jh Y2tlbmQvcG9zdG1hc3Rlci9hdXRvdmFjdXVtLmMKaW5kZXggM2IzZGY4ZmE4Yy4uN2ViZTVhZThk YyAxMDA2NDQKLS0tIGEvc3JjL2JhY2tlbmQvcG9zdG1hc3Rlci9hdXRvdmFjdXVtLmMKKysrIGIv c3JjL2JhY2tlbmQvcG9zdG1hc3Rlci9hdXRvdmFjdXVtLmMKQEAgLTgzNiw2ICs4MzYsOSBAQCBI YW5kbGVBdXRvVmFjTGF1bmNoZXJJbnRlcnJ1cHRzKHZvaWQpCiAJaWYgKFByb2NTaWduYWxCYXJy aWVyUGVuZGluZykKIAkJUHJvY2Vzc1Byb2NTaWduYWxCYXJyaWVyKCk7CiAKKwlpZiAoTG9nTWVt b3J5Q29udGV4dFBlbmRpbmcpCisJICBQcm9jZXNzTG9nTWVtb3J5Q29udGV4dEludGVycnVwdCgp OworCiAJLyogUHJvY2VzcyBzaW52YWwgY2F0Y2h1cCBpbnRlcnJ1cHRzIHRoYXQgaGFwcGVuZWQg d2hpbGUgc2xlZXBpbmcgKi8KIAlQcm9jZXNzQ2F0Y2h1cEludGVycnVwdCgpOwogfQo= --=_bfde2a778fc13971939bfd2cbd83f6b4--