Re: max freeze age query in docs - Mailing list pgsql-hackers

From Andres Freund
Subject Re: max freeze age query in docs
Date
Msg-id 20130902182657.GB11503@awork2.anarazel.de
Whole thread Raw
In response to Re: max freeze age query in docs  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: max freeze age query in docs
List pgsql-hackers
On 2013-09-02 14:20:57 -0400, Andrew Dunstan wrote:
> 
> On 09/02/2013 01:30 PM, Tom Lane wrote:
> >Andrew Dunstan <andrew@dunslane.net> writes:
> >>Yes, possibly, but we can't do that now, but I would like to fix the
> >>docs now.
> >If you want this in 9.3.0 it needs to be committed in the next couple of
> >hours.
> >
> >FWIW, the idea seemed generally sane to me, but I'd suggest not depending
> >on reltoastrelid being zero when and only when there's no match.
> >Why not test whether t.oid IS NULL, instead?
> >
> >Or actually, code it like this
> >
> >    GREATEST(age(c.relfrozenxid), age(t.relfrozenxid))
> >
> >and be done, as well as not having an ugly direct use of int4larger.
> >
> >        
> 
> 
> OK, I'll do it that way. Working on it now.

I'd vote for c.relkind != 't' AND NOT c.relfrozenxid = 0; instead of
relkind = 'r' for the main relation, that way you'd include materialized
views and stuff.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: max freeze age query in docs
Next
From: Andrew Dunstan
Date:
Subject: Re: max freeze age query in docs