Re: age(xid) on hot standby - Mailing list pgsql-hackers

From Tom Lane
Subject Re: age(xid) on hot standby
Date
Msg-id 7473.1326945412@sss.pgh.pa.us
Whole thread Raw
In response to Re: age(xid) on hot standby  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> I think we should apply the patch to return the correct SQLCODE in all
> cases, even if its supposedly not possible.

[ shrug... ]  My opinion about that has not changed.  Those are internal
sanity checks, and as such, ERRCODE_INTERNAL_ERROR is exactly the right
thing for them.  If there are paths that can reach that code, we need to
find them and plug the holes with appropriate user-facing error checks
that say what it is the user is not supposed to do.  In this example,
if we had decided that the right answer should be for age() to not be
allowed on standbys, then an error saying exactly that would be an
appropriate user-facing error.  "You're not supposed to acquire a
transaction ID" is not intelligible to the average user, and giving it
another error code doesn't improve that situation.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: foreign key locks, 2nd attempt
Next
From: "Kevin Grittner"
Date:
Subject: Re: Strange primary key constraint influence to grouping