From: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
---|---|
To: | Andrey Lizenko <lizenko79(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: rolled back transactions logging |
Date: | 2015-04-24 21:42:19 |
Message-ID: | 553AB8BB.9080601@BlueTreble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 4/23/15 5:49 PM, Andrey Lizenko wrote:
> Can VACUUM be a reason of xact_rollback increasing?
I don't think so, not without generating some kind of error.
What could be happening is plpgsql catching exceptions. A BEGIN block
with an EXCEPTION handle creates an implicit subtransaction (savepoint),
and if you catch the exception it's going to do the equivalent of
ROLLBACK TO savepoint. That might be counted as a rollback. More
importantly...
> Server version is 9.2.4
>
> P.S,
> Root problem is the number of wal files, it raised up significantly
> (more than 4 times) with the same workload and I do not know why.
... plpgsql catching a lot of exceptions in blocks that have modified
data will definitely create WAL. To be clear, the WAL was generated by
whatever DML you did inside the block, but if you trap an exception and
then loop back again and again and again... lots of extra WAL.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com
From | Date | Subject | |
---|---|---|---|
Next Message | Álvaro Hernández Tortosa | 2015-04-25 00:11:43 | Re: Fwd: [GENERAL] 4B row limit for CLOB tables |
Previous Message | Chris Mair | 2015-04-24 19:40:46 | Re: Invalid memory alloc |