On Sat, Jan 02, 2021 at 12:31:45PM +0500, Andrey Borodin wrote:
> Do I understand correctly that this is bugfix that needs to be back-patched?

The slru-truncate-modulo patch fixes a bug.  The slru-truncate-t-insurance
patch does not.  Neither _needs_ to be back-patched, though I'm proposing to
back-patch both.  I welcome opinions about that.

> Thus we should not refactor 4 identical *PagePrecedes(int page1, int page2) 
> into 1 generic function?

I agree with not refactoring that way, in this case.

> Since functions are not symmetric anymore, maybe we should have better names 
> for arguments than "page1" and "page2"? At least in dev branch.

That works for me.  What names would you suggest?

> Is it common practice to embed tests into assert checking like in 
> SlruPagePrecedesUnitTests()?

No; it's neither common practice nor a policy breach.


Reply via email to