Re: Snapshot too old logging

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kevin Grittner <kgrittn(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Snapshot too old logging
Date: 2016-11-15 18:18:27
Message-ID: CABUevExMXqtOj+eEFpJyP5mbS9YNhBaWjC7qvKO4vJGDge-0VQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 15, 2016 at 5:29 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Kevin Grittner <kgrittn(at)gmail(dot)com> writes:
> > On Tue, Nov 15, 2016 at 3:38 AM, Magnus Hagander <magnus(at)hagander(dot)net>
> wrote:
> >> Is there a reason why we don't log which relation triggered the
> snapshot too
> >> old error when it happens?
>
> > I would probably not want to mess with the text of the error
> > itself, in case any client-side software bases recovery on that
> > rather than the SQLSTATE value;
>
> Any such code is broken on its face because of localization.
> Perhaps including the relname in the main message would make it
> unduly long, but if not I'd vote for doing it that way.
>
>
Agreed.

Is there value in showing which snapshot as well? Something like:
DETAIL: snapshot <xyz> is too old to access relation <relation>

Putting both those into the main message will probably make it too long.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brad DeJong 2016-11-15 18:23:26 Re: Snapshot too old logging
Previous Message Alvaro Herrera 2016-11-15 18:14:23 Re: Patch: Implement failover on libpq connect level.