Assert that buffers are marked dirty before XLogRegisterBuffer().

Jeff Davis <jdavis@postgresql.org>

Commit: 00d7fb5e2e39198387ae00af8dd18b787b6a4d63
Author: Jeff Davis <jdavis@postgresql.org>
Date: 2023-10-24T00:17:46Z
Releases: 17.0
Assert that buffers are marked dirty before XLogRegisterBuffer().

Enforce the rule from transam/README in XLogRegisterBuffer(), and
update callers to follow the rule.

Hash indexes sometimes register clean pages as a part of the locking
protocol, so provide a REGBUF_NO_CHANGE flag to support that use.

Discussion: https://postgr.es/m/c84114f8-c7f1-5b57-f85a-3adc31e1a904@iki.fi
Reviewed-by: Heikki Linnakangas

Files

Discussion