[PATCH] pgrowlocks: Make mode names consistent with docs - Mailing list pgsql-hackers

From David Cook
Subject [PATCH] pgrowlocks: Make mode names consistent with docs
Date
Msg-id CA+dNBPNBf+FCEwohe7SH1tSks0R_G4F=tuvM=hnPs4qWiAH8vg@mail.gmail.com
Whole thread Raw
Responses Re: [PATCH] pgrowlocks: Make mode names consistent with docs
List pgsql-hackers
I noticed that pgrowlocks will use different names for shared locks depending on whether the locks are intermediated by a multixact or not. Particularly, if a single transaction has locked a row, it may return "For Key Share" or "For Share" in the "modes" array, while if multiple transactions have locked a row, it may return "Key Share" or "Share". The documentation of the pgrowlocks function only lists "Key Share" and "Share" as possible modes. (The four exclusive lock modes use the correct names in both cases)

The attached patch (against the master branch) fixes this discrepancy, by using "Key Share" and "Share" in the single transaction case, since that matches the documentation. I also updated the test's expected output so it passes again.

Thanks,
--David Cook
Attachment

pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: ProcessStartupPacket(): database_name and user_name truncation
Next
From: Tom Lane
Date:
Subject: Re: ProcessStartupPacket(): database_name and user_name truncation