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 1mubDT-0007XC-7c for pgsql-admin@arkaria.postgresql.org; Tue, 07 Dec 2021 14:13:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mubDR-0003D6-09 for pgsql-admin@arkaria.postgresql.org; Tue, 07 Dec 2021 14:13:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mubDQ-0003Cw-JT for pgsql-admin@lists.postgresql.org; Tue, 07 Dec 2021 14:13:08 +0000 Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mubDK-0001zk-1X for pgsql-admin@lists.postgresql.org; Tue, 07 Dec 2021 14:13:07 +0000 Received: by mail-qt1-x82a.google.com with SMTP id t34so14333782qtc.7 for ; Tue, 07 Dec 2021 06:13:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=uEXF/uCiOkhgVl3Ry2DGl2ZqprVRXSgdb1cpL6BGB24=; b=RzCQ4ebFauDDjxyQBN5JfyB2PV8BnogNhvkuXQTQdJ/Hmmf+Y4CUYWtjblVonGflb1 0F/1Zy3KIgYBxI40pesFX0AFLeIKb9vqljwO7GEx5P2nWHrzB0d0Lenrui1AO7MUgd5f rDHqkp/XDg+JdSi8tdeuEEQqHOORiIlKDPjv16D8OiLHpKHU/kvTiu52jh6/m5r7EDkL n8iF0v7fKwhy0KHB87UfsbwfVtXSz37XZG1Jr+7V+veEOg3qGVY+9Dc0KFrUd1ecNiav CzRzSZywFkk0kciWlZBNT1Fyt3p0tw0AM1Uc56iiMwDhYUzFDr/DiU7OebC098YAiGu0 mWGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=uEXF/uCiOkhgVl3Ry2DGl2ZqprVRXSgdb1cpL6BGB24=; b=4LXtF8q1KjL2/jj1BtblDV0JyBSyS5wlo0rJSta0v7XuxYKp+t+K2oUmFnJrrZNxMH WAKT7IO/f2sET5WCurmtBAdcUEuaCNc9kH/Wjw7ElxqO6TpidPllnoAOBA2YbjlYNimQ PALWmnnl86i4iNNr30GOC8LmXSQzFsEIXRoLSfHPPIYvtS2meDa3CAaU23dYt1UkKus0 Pq+mXqyexaFMRmiw3IlPJJ8QtlvL1mWsiICwoUb/3Y052KY1Yjr6gRsXnjpGXE96Msp4 UW72wXQi5Jl15+gALqAgg0VF4RP7K7WrS2XKNx2AmNJCiT1cyC3LX8xeiDy4XwhVaM2n 7Yvw== X-Gm-Message-State: AOAM533Fh1+0bCaFcz2/aKNpguORTKTbGqae1WnRb5zgxPRjBUuLr8IA aqUuGXZf5ktXoypeKkYUMhm+Tm8Jrx5GLA== X-Google-Smtp-Source: ABdhPJz506Rowje2kQ8Ywvpf6ByD88vlO9c7YgXq4CCKug3SMuvLOcQCNNWz3s0vRP3pUZc9mgxwnA== X-Received: by 2002:a05:622a:1114:: with SMTP id e20mr50936078qty.427.1638886379953; Tue, 07 Dec 2021 06:12:59 -0800 (PST) Received: from [192.168.2.100] (pool-72-79-19-93.nwrknj.east.verizon.net. [72.79.19.93]) by smtp.gmail.com with ESMTPSA id l10sm8755464qkp.3.2021.12.07.06.12.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Dec 2021 06:12:59 -0800 (PST) Message-ID: <181170a8-cf42-9e00-84a8-84944f4d0558@gmail.com> Date: Tue, 7 Dec 2021 09:12:58 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: Transaction Size in PostgreSQL Content-Language: en-US To: pgsql-admin@lists.postgresql.org References: From: Mladen Gogala 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 12/7/21 00:13, Sivasamy Subramaniam wrote: > Transaction size meaning, for example - any transaction over 1GB in > size? I am looking to set up an alert if any massive data changes are > happening in a single transaction. I can do it for long running > transactions or query but trying to figure out any easy way to > calculate the amount of data changes per transaction. You will have to build such tool into the application. Application will have to monitor pg_stat_xact_user_tables and send alert if the alert threshold is exceeded. That will make the application unnecessarily complex and will also impact the performance. This falls into the "no can do" category. -- Mladen Gogala Database Consultant Tel: (347) 321-1217 https://dbwhisperer.wordpress.com