Re: XLOG_NO_TRAN and XLogRecord.xl_xid

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: XLOG_NO_TRAN and XLogRecord.xl_xid
Дата
Msg-id 45DDBF33.20500@enterprisedb.com
обсуждение исходный текст
Ответ на Re: XLOG_NO_TRAN and XLogRecord.xl_xid  (Heikki Linnakangas <heikki@enterprisedb.com>)
Список pgsql-hackers
Heikki Linnakangas wrote:
> Florian G. Pflug wrote:
>> seems to imply that (some?) wal redoe records only actually get redone
>> if the transaction that caused them eventually comitted. But given the
>> way postgres MVCC works that doesn't make sense to me, and I also can't
>> find any code that would actually skip xlog entries.
> 
> That comment is a bit misleading, I agree. We don't skip xlog entries, 
> they're always replayed.
> 
> The xid in the WAL record is used by some WAL resource managers to 
> reconstruct the original data. For that purpose, it might as well not be 
> in the header, but in the data portion.
> 
> It's also used in PITR to recover up to a certain transaction, and it's 
> used to advance the next xid counter to the next unused xid after replay.

Also, we skip clog update and writing the commit record if the 
transaction hasn't written any WAL records that are tied to the transaction.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: XLOG_NO_TRAN and XLogRecord.xl_xid
Следующее
От: Tom Lane
Дата:
Сообщение: Re: XLOG_NO_TRAN and XLogRecord.xl_xid