Make multixact error message more explicit
authorAlvaro Herrera <[email protected]>
Thu, 24 Nov 2022 09:45:10 +0000 (10:45 +0100)
committerAlvaro Herrera <[email protected]>
Thu, 24 Nov 2022 09:45:10 +0000 (10:45 +0100)
There are recent reports involving a very old error message that we have
no history of hitting -- perhaps a recently introduced bug.  Improve the
error message in an attempt to improve our chances of investigating the
bug.

Per reports from Dimos Stamatakis and Bob Krier.

Backpatch to 11.

Discussion: https://postgr.es/m/CO2PR0801MB2310579F65529380A4E5EDC0E20A9@CO2PR0801MB2310.namprd08.prod.outlook.com
Discussion: https://postgr.es/m/17518-04e368df5ad7f2ee@postgresql.org

src/backend/access/transam/multixact.c

index 204aa9504562692a236fae0c9ea6731f36c970ec..e1191a7564cbde3e804b72f2954002db1bded14d 100644 (file)
@@ -799,7 +799,8 @@ MultiXactIdCreateFromMembers(int nmembers, MultiXactMember *members)
            if (ISUPDATE_from_mxstatus(members[i].status))
            {
                if (has_update)
-                   elog(ERROR, "new multixact has more than one updating member");
+                   elog(ERROR, "new multixact has more than one updating member: %s",
+                        mxid_to_string(InvalidMultiXactId, nmembers, members));
                has_update = true;
            }
        }