jackc / pglogrepl

PostgreSQL logical replication library for Go.
MIT License
330 stars 62 forks source link

Received unexpected message #24

Closed zhanghaiyang9999 closed 2 years ago

zhanghaiyang9999 commented 2 years ago

postgresql version: 10(OS:ubuntu18) when insert record, received the error message like the following: 2021/11/25 21:56:21 Received unexpected message: &pgproto3.ErrorResponse{Severity:"ERROR", SeverityUnlocalized:"ERROR", Code:"42704", Message:"publication \"pglogrepl_demo\" does not exist", Detail:"", Hint:"", Position:0, InternalPosition:0, InternalQuery:"", Where:"slot \"pglogrepl_demo\", output plugin \"pgoutput\", in the change callback, associated LSN 0/16AD8B0", SchemaName:"", TableName:"", ColumnName:"", DataTypeName:"", ConstraintName:"", File:"pg_publication.c", Line:402, Routine:"GetPublicationByName", UnknownFields:map[uint8]string(nil)} 2021/11/25 21:56:21 Received unexpected message: &pgproto3.ReadyForQuery{TxStatus:0x49}

Jille commented 2 years ago

https://github.com/jackc/pglogrepl/pull/32 handles the first message by returning an error.