Re: Automated way to find actual COMMIT LSN of subxact LSN - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Automated way to find actual COMMIT LSN of subxact LSN
Date
Msg-id 10496.1553100191@sss.pgh.pa.us
Whole thread Raw
In response to Re: Automated way to find actual COMMIT LSN of subxact LSN  (Jeremy Finzel <finzelj@gmail.com>)
Responses Re: Automated way to find actual COMMIT LSN of subxact LSN
List 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 by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: Sparse bit set data structure
Next
From: Fabien COELHO
Date:
Subject: Re: Offline enabling/disabling of data checksums