Fix copy-paste bug in 12f3867f55 triggering an assert after a write error

The same condition accidentally was copied to both branches. Manual testing
confirms that otherwise the error recovery path works fine.

Found while reviewing the logical-decoding-on-standby patch.
pull/137/head
Andres Freund 2 years ago
parent 96c498d2f8
commit 21d7c05a5c
  1. 2
      src/backend/storage/buffer/bufmgr.c

@ -5199,7 +5199,7 @@ AbortBufferIO(Buffer buf)
}
else
{
Assert(!(buf_state & BM_DIRTY));
Assert(buf_state & BM_DIRTY);
UnlockBufHdr(buf_hdr, buf_state);
/* Issue notice if this is not the first failure... */

Loading…
Cancel
Save