Open dungnh-bpp opened 3 years ago
Using PrimaryKeepaliveMessage
.
Sorry for digging into an old issue. I cannot even run it with wal2json
as the output plugin in the demo example.
It panics since the pglogrepl.Message
is Unknown
panic: interface conversion: interface is nil, not pglogrepl.Message
goroutine 1 [running]:
github.com/jackc/pglogrepl.Parse({0xc0000f401e, 0xa8, 0xa8})
/Users/visi/go/pkg/mod/github.com/jackc/pglogrepl@v0.0.0-20230318140337-5ef673a9d169/message.go:649 +0x2b9
main.main()
/Users/visi/Sourcecontrol/github.com/viggy28/pgsavior/main.go:136 +0xdda
So my questions is: I wanna use
wal2json
instead ofpgoutput
ortest_decoding
output plugin, how to determineclientXLogPos
when application consume message succeess. In yourpglogrepl_demo
example: you 're usingclientXLogPos = xld.WALStart + pglogrepl.LSN(len(xld.WALData))
withpgoutput
plugin to determixe client xlogpos, right? If I usewal2json
, how to determine that? Can you help me for this Thanks