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 1muUAE-0003MN-Kq for pgsql-admin@arkaria.postgresql.org; Tue, 07 Dec 2021 06:41:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1muUAD-0006SN-2o for pgsql-admin@arkaria.postgresql.org; Tue, 07 Dec 2021 06:41:21 +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 1muUAC-0006RN-Nk for pgsql-admin@lists.postgresql.org; Tue, 07 Dec 2021 06:41:20 +0000 Received: from mout.gmx.net ([212.227.17.21]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muUAA-0006tI-9a for pgsql-admin@lists.postgresql.org; Tue, 07 Dec 2021 06:41:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1638859274; bh=7VY6NYstyAV8C0IaLxpE1ARLSfAuYdljS+0siOip6v0=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=BNm47EklzEKMgX1lJfq7ip2q7jaEYIgd8XqLocfEpcLc026VQ8Et/ZsAhRq6HBr5F prFXiOHX3q/1jkOZWiVl0TzbkUjXiJizmVft/5ZfIeAs5sw8Utl2WkXDfzl7HubL/V x1I+AMySKuLbIk44oAcoOWwILmqZqS66PcFb7Hdg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [10.1.35.235] ([185.40.248.10]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M3lcJ-1mtewr37Ol-000wur for ; Tue, 07 Dec 2021 07:41:14 +0100 Subject: Re: Transaction Size in PostgreSQL To: pgsql-admin@lists.postgresql.org References: From: Thomas Kellerer Message-ID: <17b19213-1588-dca9-b009-8913b8d1401f@gmx.net> Date: Tue, 7 Dec 2021 07:41:13 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:NoUKqGEuS5IuuV7CkWkcoMA9lEBTfU3rYgK9Nn6L265csewtma6 XXqauekaf7cuLmuRQNMZxgTj2Ih74OBUAgup1+Wa6XI104vxEoZmLkVY+kff1WRwRGHs3ld PEPo1uTU6ypA0aC11LEsnUTV16WpjF53JUWyF+SUR0ugofLjmcISJV/Zyo3bHRKDosImrA3 eIV5qBr0c6aavrkKz8+Bg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:SeChYyaO3rE=:Uk9Ka0RCSYmVJnaEoaOw7Q Yn6+epVMZ350DqU5OkXqxMgLrMAkyuTPIBWqbCe0/65tqvaqRdyb4wTzMen/u8qI+Rrlx7FrM eZyULRY1EtpIM7kb27iVsZpVdKfrvrduNlSf3okHylFhM0ucgwMRE94EzYed2k4jWYPUGggfG QsEE07hbi/3XqJVpG+Or4DhbSvbCBgNzSZQjSFyWEmHJqFBX5ChKRU7bcc5Aw7H9E8wTS+i0+ dycYhVKngTHFIdXjPQOfPntsQ+D8K53QVC0LZGFHAKUkpZatPjdVewwKSagK6Kz85HVUs7PsC GFgUo3PGupFvKuCbzUqSarrqzkx0oPFoz/s0fHkJjsHHK+Z5M+kFbTUyL9xPjpHPkTAcH1Bij 0D7cj+41kvRmgvRRqPu5dscZ2ugiinG3N1fcCqwQe8TiKqL5ZTXp6kytgmRkNg3AafU4dLtcq b3aKuNIQJcGrimkTrJmdrhmSh0rTzO/FXYSDWGZRevr5ULJN6t00ETdSHORIF+2b+iC18GJWm P72mAArvNLK6CnDOlTEm9eAU2/LBTP9SMBMftpxJATXj//yzzSbNUkQXWtul7y2MJaLec5gsV ads3hY4RySeFRyiJKFxZrtMkwhAXHJUcsV+ZN7KNr01xx5u02B25dKX5bJwmh93vRanwY11qh F3Emws9jWquRmJ+moQHgiQYZndVnChoHnqJ5zu2fJDiAqirjXS+nq/WYFP0WArNZICaqClHMS GYWH3CtXrvgnfXlFvjEUI7lXn4+sMgIFI3NatD5kFlxMML7en4+6UGAYUPRiKGqG3JEbage/k IuOhcwzjrjXiUnXZFb5y/L0bzQN6KKcrTdxKSXpsGiO+b1lj9VEWbt6gTKyz6FfX1KjgB3y3k Z5tCrz8p3sy8Xc2zEYDz93PD5NNWleNwlwIDt5exf8WQ/KO8X6cYwgNsNDDcHbKfb30i+rxLs 7ymh7Q6Mk92Fl6z6APxFhaCkP6vL8m5po01LxYXeQ+tzrhls7w+uZc7oA05EsW0E++/RXGAxG yARmy28Vn/7HBoGdOwcaOip8z+wMI3tWEzt6420GD3cCXajwjuAMN+M/jhmA0b9ARrUrzEdKR 7g2GSd+fvoAo8M= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Sivasamy Subramaniam schrieb am 07.12.2021 um 06:13: > 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. A long running transaction doesn't necessary mean it wrote "1GB" of data, and a transaction that writes 1GB of data isn't necessarily a "long runnin= g" transaction. "Massive data changes" in a single transaction aren't really a problem. In my experience a single transaction changing a lot of rows is more efficient than multiple transactions changing fewer rows. A long _running_ transaction - even if it only changed one row - is a much bigger problem though.