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 1oFEh3-0004EJ-4V for pgsql-bugs@arkaria.postgresql.org; Sat, 23 Jul 2022 12:57:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oFEh2-0001vb-0j for pgsql-bugs@arkaria.postgresql.org; Sat, 23 Jul 2022 12:57:16 +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 1oEzsY-00006q-1q for pgsql-bugs@lists.postgresql.org; Fri, 22 Jul 2022 21:08:10 +0000 Received: from ewsoutbound.kpnmail.nl ([195.121.94.169]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oEzsT-0005BP-CR for pgsql-bugs@lists.postgresql.org; Fri, 22 Jul 2022 21:08:09 +0000 X-KPN-MessageId: 5ff04373-0a02-11ed-a322-005056abad63 Received: from smtp.kpnmail.nl (unknown [10.31.155.40]) by ewsoutbound.so.kpn.org (Halon) with ESMTPS id 5ff04373-0a02-11ed-a322-005056abad63; Fri, 22 Jul 2022 23:08:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=demon.nl; s=demon01; h=content-type:from:to:subject:mime-version:date:message-id; bh=hznno35qPYSWzIu1A+8AuxjE/CUEmdykRT/qUuqLs5k=; b=Lp5zeG6+tJN5N0o4nsFbVWnamgWcd5I67g7b7xClSoBE9Ndm3eCX0oN/WDbWuSt8w3HS9Wz9e1RF/ UVZNx6WQoMfDYnjty8xZSLC83AhBBDVuRGOgoa3POicaPkXwwF4t7kwph+COQMMRooashIjUhhvxys XLG7dAOHuOy0GhCJuTK9PC46HGF6cOOUWxOhZ3nbdzBegenXb2pVo74n0dHH4v/MjyG/gKRSdesv8l awp8MitbNQsMoRhu7GYwHdW0AmuyXs23/vj5N/Yj1KrTmnVUznhM67BLHB/dPc+abJRbZi6ZiZgSQz XMCSRQzJgTcJjf4SaCegr5Uzt+dxZuA== X-KPN-MID: 33|3YYUDIEYSwHs2fQ3CAdkvtMCemCdgnXB95hUU6/b8JfQeKCpaJSYbZaEC30XaNt T/0tpmAutED8ol96V8zxaDwgpKuAPT2wYEm6xP7M7Qas= X-KPN-VerifiedSender: Yes X-CMASSUN: 33|3QKfBwAN5SrAjpljuiPpyC+dKhbKS7j2j3AztYlsgujE1WrS9oLsuK80Qb6GFik vtzOnFj0hseXje9iBCqNR0w== X-Originating-IP: 77.172.31.29 Received: from [192.168.1.34] (77-172-31-29.fixed.kpn.net [77.172.31.29]) by smtp.xs4all.nl (Halon) with ESMTPSA id 600d3a29-0a02-11ed-9eb8-005056ab7584; Fri, 22 Jul 2022 23:08:03 +0200 (CEST) Message-ID: <2d7ff154-d0db-502d-aca8-a605fafcf395@boeringa.demon.nl> Date: Fri, 22 Jul 2022 23:08:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: Fwd: "SELECT COUNT(*) FROM" still causing issues (deadlock) in PostgreSQL 14.3/4? Content-Language: en-GB To: Bruce Momjian Cc: pgsql-bugs@lists.postgresql.org References: <85acb61d-4cbf-7544-c734-429993257547@boeringa.demon.nl> <791d1850-f337-8914-1ba0-512f4e0fef26@boeringa.demon.nl> From: Marco Boeringa In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Unfortunately, it now also again, as I have seen before in the same situation, took my PG14.4 server down by filling up my entire Ubuntu file system root, the PostgreSQL server process shut down the connection automatically as a consequence. It is not clear to me what is actually being written out that causes this. I am not really an Ubuntu / Linux expert. Any suggestions for commands to quickly find out where PostgreSQL may have dumped 100's of GB of data in file system root, as I had over 700 GB free space there? Op 22-7-2022 om 21:07 schreef Bruce Momjian: > On Fri, Jul 22, 2022 at 09:56:06AM +0200, Marco Boeringa wrote: >> Unfortunately, after more testing, it turns out this issue still persists in >> PostgreSQL 14.4. >> >> I have now encountered exactly the same problem as described in the original >> issue below: One autovacuum session that never finishes with no wait event (or >> is just incredibly slow and not finishing after many hours although it should >> in minutes considering the relative small dataset and normal operation), and >> the "client backend" and "parallel worker" stuck on the same wait events as >> listed below  with the same "SELECT COUNT (*)" SQL statement. >> >> One thing to note as well, besides this being workstation level hardware with >> ECC RAM, is that I now also activated 'pg_checksums' on the PostgreSQL >> databases, and reloaded all data, so all data should now have checksums.  No >> PostgreSQL error at all is generated via the ODBC connection I use to access >> and update the database when this happens and PostgreSQL appears stuck on the >> autovacuum. So I guess this now means I can now pretty much exclude a hardware >> error, and this must be some software issue, considering the checksums. > You might want to run these queries and show us the output, in case it > suggests a cause: > > SELECT version(); > > -- non-default server settings > SELECT name, current_setting(name), source > FROM pg_settings > WHERE source NOT IN ('default', 'override'); >