Re: Make pg_waldump report replication origin ID, LSN, and timestamp.

2021-12-12 Thread Michael Paquier
On Thu, Dec 09, 2021 at 05:42:56PM +0900, Masahiko Sawada wrote: > Thank you for updating the patch. The patch looks good to me. Done this way. Please note that while testing this patch, I have found a completely different issue. I'll spawn a thread about that in a minute.. -- Michael signatur

Re: Make pg_waldump report replication origin ID, LSN, and timestamp.

2021-12-09 Thread Masahiko Sawada
On Thu, Dec 9, 2021 at 4:02 PM Michael Paquier wrote: > > On Wed, Dec 08, 2021 at 05:03:30PM +0900, Masahiko Sawada wrote: > > Agreed. I've attached an updated patch that incorporated your review > > comments. Please review it. > > That looks correct to me. One thing that I have noticed while > r

Re: Make pg_waldump report replication origin ID, LSN, and timestamp.

2021-12-08 Thread Michael Paquier
On Wed, Dec 08, 2021 at 05:03:30PM +0900, Masahiko Sawada wrote: > Agreed. I've attached an updated patch that incorporated your review > comments. Please review it. That looks correct to me. One thing that I have noticed while reviewing is that we don't check XactCompletionApplyFeedback() in xac

Re: Make pg_waldump report replication origin ID, LSN, and timestamp.

2021-12-08 Thread Masahiko Sawada
On Wed, Dec 8, 2021 at 4:31 PM Michael Paquier wrote: > > On Mon, Dec 06, 2021 at 11:24:09PM +0900, Masahiko Sawada wrote: > > On Mon, Dec 6, 2021 at 5:09 PM Michael Paquier wrote: > >> Shouldn't you check for parsed.origin_lsn instead? The replication > >> origin is stored there as far as I rea

Re: Make pg_waldump report replication origin ID, LSN, and timestamp.

2021-12-07 Thread Michael Paquier
On Mon, Dec 06, 2021 at 11:24:09PM +0900, Masahiko Sawada wrote: > On Mon, Dec 6, 2021 at 5:09 PM Michael Paquier wrote: >> Shouldn't you check for parsed.origin_lsn instead? The replication >> origin is stored there as far as I read EndPrepare(). > > Also, looking at PrepareRedoAdd(), we check

Re: Make pg_waldump report replication origin ID, LSN, and timestamp.

2021-12-06 Thread Masahiko Sawada
On Mon, Dec 6, 2021 at 11:24 PM Masahiko Sawada wrote: > > On Mon, Dec 6, 2021 at 5:09 PM Michael Paquier wrote: > > > > On Mon, Dec 06, 2021 at 04:35:07PM +0900, Masahiko Sawada wrote: > > > I've attached a patch to add replication origin information to > > > xact_desc_prepare(). > > > > Yeah. >

Re: Make pg_waldump report replication origin ID, LSN, and timestamp.

2021-12-06 Thread Masahiko Sawada
On Mon, Dec 6, 2021 at 5:09 PM Michael Paquier wrote: > > On Mon, Dec 06, 2021 at 04:35:07PM +0900, Masahiko Sawada wrote: > > I've attached a patch to add replication origin information to > > xact_desc_prepare(). > > Yeah. > > + if (origin_id != InvalidRepOriginId) > + appendStringInfo(b

Re: Make pg_waldump report replication origin ID, LSN, and timestamp.

2021-12-06 Thread Michael Paquier
On Mon, Dec 06, 2021 at 04:35:07PM +0900, Masahiko Sawada wrote: > I've attached a patch to add replication origin information to > xact_desc_prepare(). Yeah. + if (origin_id != InvalidRepOriginId) + appendStringInfo(buf, "; origin: node %u, lsn %X/%X, at %s", +ori