jackc / pglogrepl

PostgreSQL logical replication library for Go.
MIT License
336 stars 63 forks source link

Fix: fix pglogrepl.SendStandbyCopyDone #57

Open zzzzwc opened 1 year ago

zzzzwc commented 1 year ago

Change the return value '*CopyDoneResult' to struct to avoid NPE when receive a DataRow message.

jackc commented 1 year ago

Would it be better to instantiate a CopyDoneResult internally to resolve the bug rather than change the signature of the function? In theory, that's a breaking change... though I suppose no one could be relying on it because the current code crashes... 🤔