Re: Automated way to find actual COMMIT LSN of subxact LSN

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Automated way to find actual COMMIT LSN of subxact LSN
Дата
Msg-id 10496.1553100191@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Automated way to find actual COMMIT LSN of subxact LSN  (Jeremy Finzel <finzelj@gmail.com>)
Ответы Re: Automated way to find actual COMMIT LSN of subxact LSN  (Jeremy Finzel <finzelj@gmail.com>)
Список pgsql-hackers
Jeremy Finzel <finzelj@gmail.com> writes:
> A related problem kind of demonstrates the same odd behavior.  If you put
> in recovery_target_xid to a subtransaction_id, it just skips it and
> continues recovering, which really seems to be undesirable behavior.  It
> would be nice if that also could roll up to the next valid actual commit
> transaction.

It would seem like what you're asking for is to continue until the commit
of the parent transaction, not just the next commit after the subcommit.
Otherwise (if that's an unrelated xact) the subxact would still not be
committed, so that you might as well have stopped short of it.

I'd be in favor of that for recovery_target_xid, but I'm not at all
convinced about changing the behavior for a target LSN.  The fact that
the target is a subcommit seems irrelevant when you specify by LSN.

I don't recall this for sure, but doesn't a parent xact's commit record
include all subxact XIDs?  If so, the implementation would just require
searching the subxacts as well as the main XID for a match to
recovery_target_xid.

            regards, tom lane


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

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: Sparse bit set data structure
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: Offline enabling/disabling of data checksums