Re: [HACKERS] Snapshot too old logging

2016-11-18 Thread Robert Haas
On Fri, Nov 18, 2016 at 11:49 AM, Brad DeJong wrote: > On Wed, Nov 16, 2016 at 6:43 AM, Robert Haas wrote: >> I think I was suggesting: One or more rows required by this query may >> already have been removed from "%s". > > I keep reading that as "you have data corruption

Re: [HACKERS] Snapshot too old logging

2016-11-18 Thread Brad DeJong
On Wed, Nov 16, 2016 at 6:43 AM, Robert Haas wrote: > I think I was suggesting: One or more rows required by this query may > already have been removed from "%s". I keep reading that as "you have data corruption because something removed rows that your query needs" rather than "this query took

Re: [HACKERS] Snapshot too old logging

2016-11-16 Thread Kevin Grittner
On Wed, Nov 16, 2016 at 6:12 AM, Magnus Hagander wrote: > On Tue, Nov 15, 2016 at 9:23 PM, Alvaro Herrera > wrote: >> Can this happen for relation types other than tables, say materialized >> views? (Your suggested wording omits relation type so

Re: [HACKERS] Snapshot too old logging

2016-11-16 Thread Robert Haas
On Tue, Nov 15, 2016 at 2:25 PM, Magnus Hagander wrote: > On Tue, Nov 15, 2016 at 8:22 PM, Robert Haas wrote: >> >> On Tue, Nov 15, 2016 at 2:21 PM, Kevin Grittner wrote: >> > On Tue, Nov 15, 2016 at 12:43 PM, Robert Haas

Re: [HACKERS] Snapshot too old logging

2016-11-16 Thread Magnus Hagander
On Tue, Nov 15, 2016 at 9:23 PM, Alvaro Herrera wrote: > Magnus Hagander wrote: > > On Tue, Nov 15, 2016 at 8:22 PM, Robert Haas > wrote: > > > > > On Tue, Nov 15, 2016 at 2:21 PM, Kevin Grittner > wrote: > > > > > That

Re: [HACKERS] Snapshot too old logging

2016-11-15 Thread Brad DeJong
Magnus wrote: > Just to be clear, you're suggesting 'One or more rows may have already been > removed from "%s"? Perhaps just 'This query attempted to access a page in "%s" that was modified after the snapshot was acquired.'

Re: [HACKERS] Snapshot too old logging

2016-11-15 Thread Alvaro Herrera
Magnus Hagander wrote: > On Tue, Nov 15, 2016 at 8:22 PM, Robert Haas wrote: > > > On Tue, Nov 15, 2016 at 2:21 PM, Kevin Grittner wrote: > > > That particular language would be misleading. All we know about > > > the page is that it was modified

Re: [HACKERS] Snapshot too old logging

2016-11-15 Thread Magnus Hagander
On Tue, Nov 15, 2016 at 8:22 PM, Robert Haas wrote: > On Tue, Nov 15, 2016 at 2:21 PM, Kevin Grittner wrote: > > On Tue, Nov 15, 2016 at 12:43 PM, Robert Haas > wrote: > > > >> I think it would be better not to include either the

Re: [HACKERS] Snapshot too old logging

2016-11-15 Thread Robert Haas
On Tue, Nov 15, 2016 at 2:21 PM, Kevin Grittner wrote: > On Tue, Nov 15, 2016 at 12:43 PM, Robert Haas wrote: > >> I think it would be better not to include either the snapshot or the >> block number, and just find some way to reword the error message so

Re: [HACKERS] Snapshot too old logging

2016-11-15 Thread Kevin Grittner
On Tue, Nov 15, 2016 at 12:43 PM, Robert Haas wrote: > I think it would be better not to include either the snapshot or the > block number, and just find some way to reword the error message so > that it mentions which relation was involved without implying that all >

Re: [HACKERS] Snapshot too old logging

2016-11-15 Thread Magnus Hagander
On Tue, Nov 15, 2016 at 7:43 PM, Robert Haas wrote: > On Tue, Nov 15, 2016 at 1:30 PM, Magnus Hagander > wrote: > > On Tue, Nov 15, 2016 at 7:27 PM, Robert Haas > wrote: > >> > >> On Tue, Nov 15, 2016 at 1:18 PM, Magnus

Re: [HACKERS] Snapshot too old logging

2016-11-15 Thread Kevin Grittner
On Tue, Nov 15, 2016 at 12:45 PM, Tom Lane wrote: > Magnus Hagander writes: >> Is there value in showing which snapshot as well? Something like: >> DETAIL: snapshot is too old to access relation > > Snapshots don't have names, and I can't think of a

Re: [HACKERS] Snapshot too old logging

2016-11-15 Thread Tom Lane
Magnus Hagander writes: > Is there value in showing which snapshot as well? Something like: > DETAIL: snapshot is too old to access relation Snapshots don't have names, and I can't think of a useful way of identifying them to users. regards, tom

Re: [HACKERS] Snapshot too old logging

2016-11-15 Thread Robert Haas
On Tue, Nov 15, 2016 at 1:30 PM, Magnus Hagander wrote: > On Tue, Nov 15, 2016 at 7:27 PM, Robert Haas wrote: >> >> On Tue, Nov 15, 2016 at 1:18 PM, Magnus Hagander >> wrote: >> > Is there value in showing which snapshot as well?

Re: [HACKERS] Snapshot too old logging

2016-11-15 Thread Brad DeJong
On Tue, Nov 15, 2016 at 12:20 PM Magnus Hagander wrote: > Is there value in showing the snapshot as well? I don't think so. Knowing the relname let's you look at your report/job and figure out if the access to that relation can be moved. Having the exact snapshot version isn't going to change

Re: [HACKERS] Snapshot too old logging

2016-11-15 Thread Magnus Hagander
On Tue, Nov 15, 2016 at 7:27 PM, Robert Haas wrote: > On Tue, Nov 15, 2016 at 1:18 PM, Magnus Hagander > wrote: > > Is there value in showing which snapshot as well? Something like: > > DETAIL: snapshot is too old to access relation > > IIUC, the

Re: [HACKERS] Snapshot too old logging

2016-11-15 Thread Robert Haas
On Tue, Nov 15, 2016 at 1:18 PM, Magnus Hagander wrote: > Is there value in showing which snapshot as well? Something like: > DETAIL: snapshot is too old to access relation IIUC, the granularity is per-block, not per-relation, so that might be misleading. -- Robert Haas

Re: [HACKERS] Snapshot too old logging

2016-11-15 Thread Brad DeJong
On Tue, Nov 15, 2016 at 10:30 AM, Tom Lane wrote: > > Kevin Grittner writes: > > On Tue, Nov 15, 2016 at 3:38 AM, Magnus Hagander > wrote: > >> Is there a reason why we don't log which relation triggered the > >> snapshot too old error when it happens? >

Re: [HACKERS] Snapshot too old logging

2016-11-15 Thread Magnus Hagander
On Tue, Nov 15, 2016 at 5:29 PM, Tom Lane wrote: > Kevin Grittner writes: > > On Tue, Nov 15, 2016 at 3:38 AM, Magnus Hagander > wrote: > >> Is there a reason why we don't log which relation triggered the > snapshot too > >> old error

Re: [HACKERS] Snapshot too old logging

2016-11-15 Thread Tom Lane
Kevin Grittner writes: > On Tue, Nov 15, 2016 at 3:38 AM, Magnus Hagander 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 >

Re: [HACKERS] Snapshot too old logging

2016-11-15 Thread Kevin Grittner
On Tue, Nov 15, 2016 at 3:38 AM, Magnus Hagander wrote: > Is there a reason why we don't log which relation triggered the snapshot too > old error when it happens? > > Since we do have Relation available in TestForOldSnapshot_impl(), shouldn't > we be able to include it? > >