You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I cannot get the demo running with wal2json as the output plugin. The message format looks completely different between wal2json and pgoutput. FWIW, I tried with both the format versions of wal2json and also tried it on different PG versions.
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/viggy28/go/pkg/mod/github.com/jackc/pglogrepl@v0.0.0-20230318140337-5ef673a9d169/message.go:649 +0x2b9
main.main()
/Users/viggy28/Sourcecontrol/github.com/viggy28/pglogrepl/main.go:136 +0xdda
The text was updated successfully, but these errors were encountered:
Hello @viggy28,
I'm not sure if the question is still relevant for you. But in order to use pglogrepl with wal2json you should not use pglogrepl.Parse(xld.WALData).
Instead, you should make a string from the xld.WALData (i.e. str := string(xld.WALData))
The string would contain actual output from the plugin in JSON format (e.g. {"action":"B"}, {"action":"C","origin":0}, etc.)
I cannot get the demo running with
wal2json
as the output plugin. The message format looks completely different betweenwal2json
andpgoutput
. FWIW, I tried with both the format versions ofwal2json
and also tried it on different PG versions.It panics since the pglogrepl.Message is Unknown
The text was updated successfully, but these errors were encountered: