Re: rolled back transactions logging

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: rolled back transactions logging
Дата
Msg-id 553AB8BB.9080601@BlueTreble.com
обсуждение исходный текст
Ответ на rolled back transactions logging  (Andrey Lizenko <lizenko79@gmail.com>)
Список 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


В списке pgsql-general по дате отправления:

Предыдущее
От: Chris Mair
Дата:
Сообщение: Re: Invalid memory alloc
Следующее
От: Dorian Hoxha
Дата:
Сообщение: Re: Streaming-SQL Database PipelineDB (Based on PostgreSQL 9.4) - Available in Beta