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 1sMUDH-002d3T-Dl for pgsql-general@arkaria.postgresql.org; Wed, 26 Jun 2024 15:05:35 +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 1sMUDF-004yKw-HW for pgsql-general@arkaria.postgresql.org; Wed, 26 Jun 2024 15:05:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sMUDE-004yK6-Mk for pgsql-general@lists.postgresql.org; Wed, 26 Jun 2024 15:05:33 +0000 Received: from fhigh6-smtp.messagingengine.com ([103.168.172.157]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sMUDB-003F3f-Rb for pgsql-general@lists.postgresql.org; Wed, 26 Jun 2024 15:05:31 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 4429311401C4; Wed, 26 Jun 2024 11:05:28 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Wed, 26 Jun 2024 11:05:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1719414328; x=1719500728; bh=0g2ZOwajy4MCnp47ZJvNIc9ZYZOYIMfN/EHsChSYm2E=; b= phliOPzPx+mRWINOl8tjvSrrabxWCfWJFEeFEW6hKY2/goN7QOX0SuS2hSrlDIEn hYJAeB2ZzL8ZF7ep980KOznG3S9CFu3Vi3cacr9TpAx1oRTJv+Nhw2iYagpOlFlB Gv5nPMNon/lp0lThafue9ZOH/+WzrWhcAnjVTaSMbYI/Axrk3sLkzH07zqueYUCW cBWXyCoJlj3b5St8xXxF8+48zLsK4oIl5chYSRTeHfu68G2teune3smvbCfCHogc SFPrFBv9OMZH/G/bYkDedmuZjWv4F0HTBDopaMqwDWF2Spvcde5iLYi/vgjRvNTZ Mhknu8vnKofO94cF+WmqNQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1719414328; x= 1719500728; bh=0g2ZOwajy4MCnp47ZJvNIc9ZYZOYIMfN/EHsChSYm2E=; b=n ieXCY7m7tGS3D7eslF0WTR9REseUOs1AenYSYa5smK7RwOPMOc7Q6Oso5wUuEoXo RV/qD5LpKbqzNVCL+6FxaKEiyY39JZhaI4prA583TCGQIdA9kNOSSJft+rxkkhyn zF721i8A59bHQomKJXTQcjzUdOsKde5S2km0Zdxn2Zca5ViL0jSaKdSCIZJwoNNJ ce/ftIV7mMVo8kuREjtVIm40sDIT/jo15evKqyRuAE6Zu+Z5r2wRlDpilbDkJGE2 qq3DjGEQ4ejOihWirckstM4u3D8oUJaT77gAy56cvwd5xYuB85uAZlZzUBHPKv+e 9fbuuV/0XMZlaommd3IOg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrtddvgdekhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuggftrfgrthhtvghrnhepkeefheduvdejiefgieefjedtudduffelvdefleehfedt ieffuefgvdekleegtddvnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgr nhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 26 Jun 2024 11:05:26 -0400 (EDT) Message-ID: Date: Wed, 26 Jun 2024 08:05:26 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Autovacuum, dead tuples and bloat To: "Shenavai, Manuel" , Achilleas Mantzios , "pgsql-general@lists.postgresql.org" References: <2f2aafe6-3e29-4305-a279-1b3d56e9389e@cloud.gatewaynet.com> <53da5a20-ca35-40fa-85a3-c59d4302a512@aklaver.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 6/26/24 00:03, Shenavai, Manuel wrote: > Thanks for the suggestions. > I checked pg_locks shows and pg_stat_activity but I could not find a LOCK or an transaction on this (at this point in time). > > I assume that this problem may relate to long running transactions which write a lot of data. Is there already something in place that would help me to: > 1) identify long running transactions > 2) get an idea of the data-volume a single transaction writes? > > I tested the log_statement='mod' but this writes too much data (including all payloads). I rather would like to get a summary entry of each transaction like: > "Tx 4752 run for 1hour and 1GB data was written." https://www.postgresql.org/docs/current/runtime-config-logging.html log_min_duration_statement Read the Note below the entry. This will log long running queries, though it will not show th amount of data written. If you want to go more in depth there is: https://www.postgresql.org/docs/current/pgstatstatements.html It is an extension that you will need to install per instructions at the link. > > Is there something like this already available in postgres? > > Best regards, > Manuel -- Adrian Klaver adrian.klaver@aklaver.com