On Tue, Apr 7, 2020 at 2:28 PM Andres Freund <and...@anarazel.de> wrote: > Does that make some sense? Do you have a better suggestion for a name?
I think it makes sense. I have two basic problems with the name. The first is that "on disk" doesn't seem to be a very clear way of describing what you're actually checking here, and it definitely doesn't refer to an existing concept which sophisticated hackers can be expected to understand. The second is that "may" is ambiguous in English: it can either mean that something is permissible ("Johnny, you may go to the bathroom") or that we do not have certain knowledge of it ("Johnny may be in the bathroom"). When it is followed by "be", it usually has the latter sense, although there are exceptions (e.g. "She may be discharged from the hospital today if she wishes, but we recommend that she stay for another day"). Consequently, I found that use of "may be" in this context wicked confusing. What came to mind was: bool RobertMayBeAGiraffe(void) { return true; // i mean, i haven't seen him since last week, so who knows? } So I suggest a name with "Is" or no verb, rather than one with "MayBe." And I suggest something else instead of "OnDisk," e.g. AssertTransactionIdIsInUsableRange() or TransactionIdIsInAllowableRange() or AssertTransactionIdWraparoundProtected(). I kind of like that last one, but YMMV. I wish to clarify that in sending these review emails I am taking no position on whether or not it is prudent to commit any or all of them. I do not think we can rule out the possibility that they will Break Things, but neither do I wish to be seen as That Guy Who Stands In The Way of Important Improvements. Time does not permit me a detailed review anyway. So, these comments are provided in the hope that they may be useful but without endorsement or acrimony. If other people want to endorse or, uh, acrimoniate, based on my comments, that is up to them. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company