Re: PG and undo logging

Поиск
Список
Период
Сортировка
От Ravi Krishna
Тема Re: PG and undo logging
Дата
Msg-id CACER=P3QOkXGcVK0FkzF6NrYoEE1tOhMFktxB1MGg_61fY=LRQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PG and undo logging  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: PG and undo logging
Список pgsql-general
undo means that reading the WAL logs and able to rollback a row back
to its original state before the update. Typically it is used to
rollback a long running transaction which got aborted due to a crash.
Here is an example:

2.pm You kick off a huge transaction to update say 1 million rows.
 between 2.01 pm and 2.05pm, the db did multiple checkpoints.
2.06pm - machine crashed.

Note that at 2.06, your transaction of 2pm was still running. So when
the db starts later on, after redoing all transactions from the last
checkpoint @2.05pm till the time of crash 2.06pm, it also has to
rollback the 2pm update also because it never got completed. This
means, the rollback will have to go past several check points (between
2.01pm and 2.05pm).

Hope this explains it clearly.


On Sat, May 23, 2015 at 4:48 PM, David G. Johnston
<david.g.johnston@gmail.com> wrote:
> On Sat, May 23, 2015 at 1:34 PM, Ravi Krishna <sravikrishna3@gmail.com>
> wrote:
>>
>> Is it true that PG does not log undo information, only redo. If true,
>> then how does it bring a database back to consistent state during
>> crash recovery. Just curious.
>
>
> What does "undo" mean?
>
> David J.
>


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

Предыдущее
От: Daniel Begin
Дата:
Сообщение: Re: FW: Constraint exclusion in partitions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Re: Server tries to read a different config file than it is supposed to