Search Postgresql Archives

Re: rolled back transactions logging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux