diff --git a/pglogrepl.go b/pglogrepl.go index ce6f6ec..78f8b72 100644 --- a/pglogrepl.go +++ b/pglogrepl.go @@ -671,7 +671,7 @@ type CopyDoneResult struct { // SendStandbyCopyDone sends a StandbyCopyDone to the PostgreSQL server // to confirm ending the copy-both mode. -func SendStandbyCopyDone(_ context.Context, conn *pgconn.PgConn) (cdr *CopyDoneResult, err error) { +func SendStandbyCopyDone(_ context.Context, conn *pgconn.PgConn) (cdr CopyDoneResult, err error) { // I am suspicious that this is wildly wrong, but I'm pretty sure the previous // code was wildly wrong too -- wttw conn.Frontend().Send(&pgproto3.CopyDone{}) diff --git a/pglogrepl_test.go b/pglogrepl_test.go index ee684b2..433393d 100644 --- a/pglogrepl_test.go +++ b/pglogrepl_test.go @@ -324,7 +324,7 @@ drop table mytable; copyDoneResult, err := pglogrepl.SendStandbyCopyDone(ctx, conn) require.NoError(t, err) - assert.Nil(t, copyDoneResult) + assert.Equal(t, copyDoneResult, pglogrepl.CopyDoneResult{}) } func TestBaseBackup(t *testing.T) {