On Tue, Mar 18, 2014 at 3:38 AM, Alvaro Herrera <alvhe...@2ndquadrant.com> wrote: > Here's an adjusted version. In this one, the extra info is not used to > construct a string from pieces, but instead it puts it at the end, like > this: > > LOG: process 18899 still waiting for ShareLock on transaction 697 after > 1000.203 ms > CONTEXT: while operating on tuple (0,2) in relation "public"."foo" of > database "postgres": updating tuple > > This way, each part can sensibly be translated. In fact I did translate > one instance to test it at work, and it looks good to me: > > LOG: el proceso 22555 adquirió ShareLock en transacción 705 después de > 1514.017 ms > CONTEXT: mientras se operaba en la tupla (0,2) en la relación "public"."foo" > de la base de datos «postgres»: actualizando tupla > > Now there might be bikeshedding on the exact wording I've chosen for > each instance of context setup, but I expect it's a fairly minor point > now. > > One remaining issue is that now ConditionalXactLockTableWait doesn't set > up error context info.
ConditionalXactLockTableWait() is not going to block on lock which is when this new context will be printed. So I think there is no need to change it. Is there a case where it will be needed which I am missing? > We could solve this by having a common routine > that serves both that one and XactLockTableWait (much like > Do_MultiXactIdWait does), but I'm not sure it's worth the trouble. > Thoughts? > Therefore I think the only case worth considering here is when > database/relation/TID are all defined. The other cases where there is > partial information are dead code; and the case where there is nothing > defined (such as the one in SnapBuildFindSnapshot) is already handled by > simply not setting up a context at all. Right. So I think we should just keep one version of message. With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers