jackc / jackc/pglogrepl

Unable to use wal2json plugin with the demo

Open
#54 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
546
Forks
83
Avg merge
2d 21h
Merged PRs (30d)
1

Description

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
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading main.go around line 136 and the pglogrepl.Parse call shown in the panic, then compare the wal2json and pgoutput message formats described in the report. Done means the demo no longer panics when configured with wal2json, with behavior or support boundaries verified on the PostgreSQL versions and both wal2json format versions mentioned.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.