From: | David Cook <divergentdave(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | [PATCH] pgrowlocks: Make mode names consistent with docs |
Date: | 2023-06-30 15:45:57 |
Message-ID: | CA+dNBPNBf+FCEwohe7SH1tSks0R_G4F=tuvM=hnPs4qWiAH8vg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
0001-pgrowlocks-Make-mode-names-consistent-with-docs.patch | text/x-patch | 3.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-06-30 15:54:12 | Re: ProcessStartupPacket(): database_name and user_name truncation |
Previous Message | Nathan Bossart | 2023-06-30 15:42:18 | Re: ProcessStartupPacket(): database_name and user_name truncation |